Commit 77a248b
authored
Fix createFromFormat with Unix timestamp format 'U' (#502)
The 3.3.2 fix for respecting testNow in createFromFormat
incorrectly applied testNow values when using the Unix timestamp
format 'U'. Since 'U' sets all date/time components from the
Unix timestamp value, testNow should not be applied.
This caused createFromFormat('U', '0') to return the current
test time instead of the Unix epoch (1970-01-01 00:00:00).
The fix adds 'U' to the list of format specifiers that should
skip the testNow application, similar to '!' and '|'.1 parent e425685 commit 77a248b
2 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
| 697 | + | |
| 698 | + | |
698 | 699 | | |
699 | | - | |
| 700 | + | |
| 701 | + | |
700 | 702 | | |
701 | 703 | | |
702 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
114 | 130 | | |
115 | 131 | | |
116 | 132 | | |
| |||
0 commit comments