Howard Hinnant
ea0158c779
Move get_program_folder closer to where it is used
2017-07-03 16:45:11 -04:00
Howard Hinnant
a0b8883763
Remove unused variables in load_timezone_mappings_from_xml_file
2017-07-03 16:43:01 -04:00
Howard Hinnant
e0c962a8ce
Silence unused variable warnings
2017-07-01 20:37:14 -04:00
Roel Standaert
7cbc4d8013
Also ignore leap-seconds.list
...
The tzdata package on Ubuntu includes /usr/share/zoneinfo/leap-
seconds.list. This is not a TZif file, so it should be ignored.
2017-06-29 10:07:35 -04:00
Howard Hinnant
bee4f27d4a
Correct problems with load_timezone_mappings_from_xml_file
...
* Move outside of HAS_REMOTE_API.
* Ignore non-empty lines full of white space.
2017-06-26 22:03:01 -04:00
Howard Hinnant
88890939d5
Add zone1970.tab to the list of files
...
that should be ignored by init_tzdb() under USE_OS_TZDB.
2017-06-14 20:48:19 -04:00
Howard Hinnant
aa4dafcc46
Silence sign conversion warnings
2017-06-12 13:33:47 -04:00
Howard Hinnant
cc81c9ea50
Fix minor problems for g++:
...
* Add missing #include <string>
* Explicitly convert sys_days to sys_seconds in conditional operator
2017-06-12 09:44:41 -04:00
Howard Hinnant
a610f087c1
Add support for the zic-compiled OS-supplied time zone DB:
...
* Avoids the need to download the IANA database.
* Heavily based on contributions by Aaron Bishop.
* Turn on with -DUSE_OS_TZDB, off by default.
* Not supported on Windows.
* Disables HAS_REMOTE_API.
* get_tzdb().version only supported on Apple. This string has
the value "unknown" elsewhere.
* Leap second support is missing on Apple, and may not be on your
platform either (please report). Leap second support is enabled,
disabled with -DMISSING_LEAP_SECONDS.
Without leap second support, utc_time, tai_time, and gps_time (and
those clocks) are not available.
* On Apple, time zone transitions are only supported in the range:
1901-12-13 20:45:52 to 2038-01-19 03:14:07
* On Linux, time zone transitions are only as far in the future as
the OS-provided transitions go. There is no support for POSIX-
style transitions.
2017-06-04 21:04:53 -04:00
Howard Hinnant
5132385454
Remove obsolete LAZY_INIT flag.
2017-06-04 20:32:37 -04:00
Howard Hinnant
5c38ad84e8
Eliminate TIMEZONE_MAPPING by making it equivalent to _WIN32.
...
* Clean up indenting and whitespace.
* No functionality changes intended.
2017-06-04 20:32:37 -04:00
Tullio Menga
83c8b4d522
changes for compatibility with Clang with Microsoft CodeGen (v140_clang_c2):
...
- added date:: namespace to flloor() and abs() calls
- added IUnknown forward declaration before including Windows headers to prevent issue with objbase.h
- minor changes
2017-05-08 10:04:20 -04:00
Tomi Valkeinen
44f6dfc58e
fix compile warning about unused get_download_gz_file()
...
get_download_gz_file() is not used when HAS_REMOTE_API=0, and causes:
warning: 'std::__cxx11::string date::get_download_gz_file(const string&)' defined but not used [-Wunused-function]
Wrap get_download_gz_file() inside #ifdef to remove the warning.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi >
2017-05-02 20:10:44 -04:00
Jaak Ristioja
ec7db09085
Use system_error instead of strerror_r:
...
* Addresses portability issues.
2017-05-02 20:10:44 -04:00
Howard Hinnant
b2dc8b1f6e
Tweak getTimeZoneKeyName():
...
* for systems that return "Coordinated Universal Time".
* return "UTC" instead.
2017-04-18 20:48:28 -04:00
Howard Hinnant
c64d69b1e1
Avoid getting localized time zone names from Windows OS.
...
* Use GetDynamicTimeZoneInformation to get .TimeZoneKeyName
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724318(v=vs.85).aspx
> Retrieves the current time zone and dynamic daylight saving time settings.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724253(v=vs.85).aspx
> The name of the time zone registry key on the local computer.
* This avoids the need to map from StandardName to TimeZoneKeyName.
* Using .DynamicDaylightTimeDisabled = true forces the OS to return a
non-daylight saving time result.
* Use of wcstombs is preferred over wstring_convert as the latter is now
deprecated in C++17 because the implementors could not interpret the
specification.
2017-04-17 19:06:58 -04:00
gm
885910375f
Fix pragma warnings. Displayed at least by MSVC.
2017-04-16 23:53:37 +12:00
Jan Kratochvil
a4eef8e20c
Fix gcc -O -D_FORTIFY_SOURCE.
2017-04-03 20:46:36 -04:00
Jan Kratochvil
1fd0806757
Fix -Wshadow for gcc and clang.
2017-04-03 20:46:36 -04:00
Florian Dang
c4c2550b29
Ignore GCC warnings.
...
* 4.9 missing initializer warnings
* pedantic for __int128 case
* Wrap diagnostic push and pop in tz.cpp and date.h.
2017-04-01 12:36:54 -04:00
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 ebf3b0776a .
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