59 Commits

Author SHA1 Message Date
Jiangang (Jeff) Zhuang
64ea0a5bc3 move file scope static variables into functions to deal with static initialization order problem 2016-12-02 20:57:21 -05:00
Howard Hinnant
806c29fddc Lots of minor changes motivated by reviews of the draft proposal 2016-10-15 17:31:08 -04:00
Howard Hinnant
19c83e47ed Get local version from NEWS instead of Makefile 2016-09-28 18:08:50 -04:00
Sascha Zelzer
641cd739c3 VS2013's std::vector does not support incomplete template types.
This commit works around this by exposing the zonelet class declaration
to the public tz.h header.
2016-09-15 20:10:04 -04:00
Sascha Zelzer
553affefa4 Work around a compiler bug in VS2013 with explicit conversion constructors. 2016-09-15 20:10:04 -04:00
Howard Hinnant
7e9d9075d9 Miscellaneous changes while enabling iOS support
Put all of the logic for discovering iOS in one place in ios.h.

Make TAR_DEBUG configurable and default it to 0.

Various whitespace style pickiness.
2016-08-23 20:55:13 -04:00
schmidt9
927fc619ef Namespaces, ios macro 2016-08-21 21:37:24 +03:00
schmidt9
78025bf922 Add iOS support 2016-08-14 20:35:22 -04:00
Howard Hinnant
137c317cc6 Add INSTALL configuration. 2016-08-06 14:57:47 -04:00
Howard Hinnant
b4ca58d9a8 Revert "Remove support for using system() now other means proven."
This reverts commit ebf3b0776ab8d68ca9b3f4f02415092bc8935d75.
2016-08-05 20:16:09 -04:00
gm
ebf3b0776a Remove support for using system() now other means proven.
* Other miscellaneous improvements.
2016-07-27 18:45:10 -04:00
Pavel
52e2a0b2cf Prevent warnings when using -Wundef flag 2016-07-04 11:14:59 -04:00
gm
d252405747 Remove tinyxml2 dependency. 2016-06-25 17:00:05 -04:00
gm
9435e7b687 Fix a todo and a few micro optimisations. Trying harder to locate unzip program.
TZ will now work when 7-zip is installed somewhere other than its default location.
2016-06-23 02:54:36 +12:00
nico-engels
91c05caaff Check if mapping file exists when !AUTO_DOWNLOAD
~ Check if the windowsZones.xml realy exists to not segfault in TinyXml parser.
~ Remove old TimeZoneMappings.csv mapping from repo. Use the http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml instead.
2016-06-21 21:46:33 -04:00
gm
de458e9b99 Allow the option to not use the std::system api and make the default NOT use it for all platforms. 2016-06-20 23:34:24 -04:00
gm
55087c6cbd HAS_REMOTE_API support for Windows. Adds support for MingW too.
* HAS_REMOTE_API still defaults to 0
* When HAS_REMOTE_API=0 only libraries advapi32.lib, ole32.lib and shell32.lib are required.
* Setting HAS_REMOTE_API=1 requires curl: https://curl.haxx.se/libcurl/
*- Also need to manually install 7-Zip (http://www.7-zip.org).
*- Will automatically install Tinyxml2 (http://www.grinninglizard.com/tinyxml2/).
*- Will automatically install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
2016-06-16 22:03:12 -04:00
Howard Hinnant
5aa704d5f7 Port current_zone to Red Hat 2016-06-10 21:15:59 -04:00
gm
7e66cb2e83 Improve cross platform support.
Make validate work for C++11 because the library supports it.
Fix an unused variable mistake i made earlier.
Make constructor public, seems it should be. Possible compiler bug?
2016-06-04 13:38:50 -04:00
gm
3293637e70 Tighten up parsing. Detect missing quotes. Use istringstream for clarity. 2016-06-04 13:36:40 -04:00
gm
ee96fe5c6d Make mapping file handle windows line endings and generalize copyright format and checking slightly. 2016-06-02 00:49:11 +12:00
Howard Hinnant
a89aab05cf Protect from overflow when minutes is 32 bits 2016-05-31 11:12:20 -04:00
Howard Hinnant
ea2d0d3357 constexpr more stuff and clean up whitespace 2016-05-30 22:09:21 -04:00
Howard Hinnant
76bef1fe01 Support wide streams 2016-05-29 00:15:33 -04:00
Howard Hinnant
f60f61201c Rename Leap to leap 2016-05-28 20:27:02 -04:00
Howard Hinnant
b0a23f2cff Rename Link to link 2016-05-28 20:20:28 -04:00
Howard Hinnant
67c31d794e Protect undocumented constructors 2016-05-28 14:09:46 -04:00
Howard Hinnant
f5f0f80778 Get rid of tz. Hide unnecessary API. Clean up get_info 2016-05-08 22:59:39 -04:00
Howard Hinnant
1e5d2fa8dd Create local and system time types for timezone functions.
* Add sys_time.
* Add sys_days.
* Add sys_seconds.
* Add local_time.
* Add local_days.
* Add local_seconds.
* Rename day_point to sys_days.
* Rename Zone to time_zone.
2016-05-03 23:19:09 -04:00
Howard Hinnant
cd79376546 Add remote API and auto-download of tzdata. 2016-04-09 14:07:19 -04:00
Howard Hinnant
e79634f61d Optimize initialization of tz database
* Defer expensive parts of the initialization
* The deferment can be turned off with -DLAZY_INIT=0
2016-04-05 16:33:20 -07:00
Howard Hinnant
e8f95dddb7 Add format and parse functionality. 2016-04-03 18:57:02 -04:00
Howard Hinnant
bf9fe449cd Correct buffer management with Windows system calls.
Credit: Reiner Eiteljörge
2016-03-27 15:35:14 -04:00
Howard Hinnant
f1d2e869d7 Print out time zone database version 2016-02-19 18:48:23 -05:00
Howard Hinnant
5acaffc2b3 Add timezone db version and misc cleanup 2016-01-27 20:34:48 -05:00
Ivan Pizhenko
0e64070a33 Correction after code review 2015-12-02 16:22:09 +02:00
ivanp2015
50802176f3 TZ stuff fixed for VS2013 2015-11-29 07:56:59 +02:00
Ivan Pizhenko
bf699e573b Fixed GCC 4.8 compilation issue 2015-11-08 00:54:02 +02:00
Howard Hinnant
819d2c3575 Minor cleanup and crank up warnings. 2015-10-27 12:14:30 -04:00
gm
2467d56f11 Address issue 19: define NOMINMAX and WIN32_LEAN_AND_MEAN. In addition, fix some warnings so MSVC will compile at /W4 with no warnings.
No functional change intended.
2015-10-22 22:36:37 +13:00
Howard Hinnant
6b03ff2e70 Push tz configuration up higher in the source file. 2015-09-27 10:49:10 -04:00
gm
635ec55065 Throw a runtime error if the install folder does not exist.
Replace my accidental use of NULL with nullptr.
Improve some comments.
2015-09-27 20:55:55 +13:00
gm
0791828329 Fix a WIN32 -> _WIN32 typo and try to make some comments more readable. 2015-09-24 14:46:20 +12:00
Howard Hinnant
479cd16986 Add validate test for timezones 2015-08-15 16:00:42 -04:00
Ville Voutilainen
eb32682e99 Comment typos 2015-08-10 23:14:15 +03:00
Ville Voutilainen
13de3eb7f2 Add myself to tz.cpp copyright 2015-08-10 09:59:01 +03:00
Howard Hinnant
28eadffa06 Implement '%z' 2015-08-08 18:11:35 -04:00
Howard Hinnant
999dfc4b37 Change to MIT copyright
* Added unicode copyright to CLDR-derived mapping.
2015-08-08 17:03:43 -04:00
Howard Hinnant
33f923b508 Rename seconds_point to second_point for consistency with day_point. 2015-08-08 13:20:12 -04:00
Howard Hinnant
0d0841f5b8 Rename current_timezone() to current_zone():
* Better symmetry with locate_zone(name).
2015-08-08 13:06:04 -04:00