74 Commits

Author SHA1 Message Date
Howard Hinnant
3ab6510cab Update copyright to 2017 2017-03-21 21:52:51 -04:00
Florian Dang
5e86f2c5ba Create downloads folder when it does not exist yet. 2017-03-20 18:25:19 -04:00
Gaspard Petit
a811a20748 Fixes minor typos in comments - no actual change to code 2017-03-08 11:28:35 -05:00
Jiangang (Jeff) Zhuang
3e906a2409 Remove a leftover output to std::cout 2017-02-13 12:17:11 -05:00
Howard Hinnant
5c09ae73f2 Work around {} bug for older compilers 2017-02-08 11:32:33 -05:00
Howard Hinnant
098223cf6d Second try at silencing "unused" warning for strerror_r 2017-02-07 17:31:14 -05:00
Howard Hinnant
6a31edcb38 Silence "unused" warning for strerror_r 2017-02-06 10:18:40 -05:00
Nicolas Veloz Savino
c1034550d2 Exclude expand_path when INSTALL is not defined 2017-01-30 18:02:06 -05:00
Jiangang (Jeff) Zhuang
095f66af28 resolve /etc/localtime by calling realpath 2017-01-14 07:46:05 -05:00
Howard Hinnant
659cdca5dc Only define get_windows_zones_install() under TIMEZONE_MAPPING 2017-01-09 21:01:39 -05:00
Howard Hinnant
634b84eb60 Introduce set_install as suggested by PR 99
* Retain install variable as a function local static to maintain
  recent fixes to initialization order problems.
2017-01-07 18:27:40 -05:00
Jiangang (Jeff) Zhuang
c6f3dd2832 make the location of windowsZones.xml configurable 2017-01-05 20:28:12 -05:00
Roel Standaert
09537c4e19 Added missing #include <tuple> in tz.cpp
This is needed for std::tie. GCC and Clang are fine with it missing, but
my Visual Studio doesn't like it.
2017-01-03 10:23:38 -05:00
Howard Hinnant
2935f80109 Have get_version check for the file named version first 2017-01-01 15:02:08 -05:00
gm
07d9e8a0fe Enable the c++14 CONSTDATA code path for VS2017 and fix const const warning. 2017-01-01 18:01:20 +13:00
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