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
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