[SERVER-20359] result of terseCurrentTime(false) is not ISO 8601 compatible Created: 10/Sep/15 Updated: 14/Sep/20 Resolved: 14/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | 4.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Sara Golemon |
| Resolution: | Done | Votes: | 0 |
| Labels: | move-sec | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Security 2020-09-21 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The time component of a UTC date time object may be separated with : (for the extended format), or with nothing (the basic format). When called with the default argument of 'true' the terseCurrentTime function produces the extended format. However, the extended format's use of : as a separator makes it invalid as a filename. When called with 'false', terseCurrentTime uses the '-' character to separate the time components, which results in a format which is not compatible with ISO 8601. We should either fix the function to remove any separator in the time component when the function is called with 'false', or update the documentation of the function to make clear that it does not produce UTC date times in that case. Note that our log file extension currently reflects the results of calling terseCurrentTime with 'false'. |
| Comments |
| Comment by Githook User [ 14/Sep/20 ] |
|
Author: {'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}Message: |
| Comment by Githook User [ 14/Sep/20 ] |
|
Author: {'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}Message: |
| Comment by Sara Golemon [ 11/Sep/20 ] |
|
Checking through v3.6 through master, it doesn't appear as though we ever call terseCurrentTime(true) (or terseCurrentTime() which uses the default true). Given that, and given that it seems to only be used for creating filenames, I'll remove the argument (simplifying it), and update the comment to reflect that it produces timestamps appropriate for use in filenames.
Edit to reflect that we have a call to gmtime_r() hidden in time_t_to_Struct() which resolves this. So it is expressed in UTC, even if not in ISO8601. |