-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: 24h time #524
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
There was a problem hiding this comment.
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.