Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 24h time #524

Merged
merged 1 commit into from
Jun 2, 2023
Merged

fix: 24h time #524

merged 1 commit into from
Jun 2, 2023

Conversation

Senna46
Copy link
Collaborator

@Senna46 Senna46 commented Jun 2, 2023

No description provided.

@@ -76,7 +76,7 @@ <h2 class="card-title"></h2>
{{ block?.block?.header?.proposer_address }}
</td>
<td>{{ block?.block?.data?.txs?.length }}</td>
<td>{{ block?.block?.header?.time | date : 'yy/MM/dd hh:mm' }}</td>
<td>{{ block?.block?.header?.time | date : 'yy/MM/dd HH:mm' }}</td>
</tr>
</ng-container>
<ng-template #empty>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code patch changes a date format in an Angular template. Instead of using lowercase "hh" for the hour, it uses uppercase "HH", which represents the 24-hour clock. This is a minor improvement that eliminates the ambiguity between AM and PM times.

There don't seem to be any obvious bug risks with this code patch, as it only affects the presentation of data on the front end. However, it may be worth checking if the change impacts any other parts or components of the application.

Overall, this seems like a harmless and helpful update to the code.

@@ -42,7 +42,7 @@ <h2 class="card-title">Latest Blocks</h2>
{{ block?.block?.header?.proposer_address }}
</td>
<td>{{ block?.block?.data?.txs?.length }}</td>
<td>{{ block?.block?.header?.time | date : 'yy/MM/dd hh:mm' }}</td>
<td>{{ block?.block?.header?.time | date : 'yy/MM/dd HH:mm' }}</td>
</tr>
</ng-container>
<ng-template #empty>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the provided code patch, it appears that the only change made was to modify a date format string. The hh token was changed to HH, which means that the hours will now be displayed in a 24-hour format instead of a 12-hour format.

There do not seem to be any bug risks associated with this change, as it is simply a formatting adjustment. However, if there are specific requirements around how the time should be displayed (such as displaying the time zone or using a different format), those could be additional improvements to consider.

@@ -43,7 +43,7 @@ <h2 class="card-title">Transactions</h2>
{{ tx.txhash }}
</th>
<td>
{{ tx.timestamp | date : 'yy/MM/dd hh:mm' }}
{{ tx.timestamp | date : 'yy/MM/dd HH:mm' }}
</td>
</tr>
</ng-container>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code patch updates the time format of a transaction from using 'hh:mm' to 'HH:mm', where 'HH' means 24-hour time. This can be an improvement for clarity and consistency in time presentation if users are accustomed to the 24-hour time format.

However, without further context and information about the requirements and use case of this code, it's difficult to identify any potential bug risks that may result from this change or suggest further improvements.

@@ -72,7 +72,7 @@
{{ tx.txhash }}
</th>
<td>
{{ tx.timestamp | date : 'yy/MM/dd hh:mm' }}
{{ tx.timestamp | date : 'yy/MM/dd HH:mm' }}
</td>
</tr>
</ng-container>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code patch appears to be a minor change in the format of timestamp displayed for a transaction. The 'hh' has been replaced with 'HH' in the date filter, indicating that the hours will now be represented in 24-hour format rather than 12-hour format.

There don't seem to be any obvious bug risks associated with this change. However, it's possible that there may be other parts of the code where the timestamp format is being used or parsed and this change could affect those parts as well. It's always a good idea to test the changes thoroughly before deploying them to production.

As for improvement suggestions, without any additional context or information about the codebase, it's difficult to provide any specific recommendations.

@Senna46 Senna46 merged commit e76d454 into develop Jun 2, 2023
@Senna46 Senna46 deleted the hotfix/time-24h branch June 2, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant