Commit e2818b8
authored
Parse and emit years from 1900 to 9999, and remove environment variable dependence on Android (microsoft#1117)
Update date formatting and parsing to accept all years between 1900 and 9999.
This unblocks the Azure Storage SDK which uses 9999-12-31 as a sentinel value for "no expiration time" which was broken by the locale insensitive date formatting's dependence on _mkgmtime, with its 1970-3000 range. By morally reimplementing _mkgmtime, this change also lets us remove the Android workaround of changing the TZ environment variable.
Release\tests\functional\utils\datetime.cpp
Turn on tests for values that would need 64 bits represented as a time_t, even for 32 bit time_t platforms.
Add year 1900 and 9999 test cases, and remove year 3000+ and 1969- negative tests.
Release\tests\functional\http*
Drive by fix for new VS2019 warnings about narrowing.
Release\src\utilities\asyncrt_utils.cpp
Remove dependence on _mkgmtime and gmtime_r/gmtime_s by implementing replacements loosely inspired by both the C runtime's date operations and .NET's handling of the Gregorian calendar's 400 year cycle.1 parent c9707ef commit e2818b8
File tree
4 files changed
+325
-242
lines changed- Release
- src/utilities
- tests/functional
- http
- listener
- utilities
- utils
4 files changed
+325
-242
lines changed
0 commit comments