MCPcopy Create free account
hub / github.com/HowardHinnant/date / get_version

Function get_version

src/tz.cpp:2903–2924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2901
2902#if !defined(ANDROID) && !defined(__ANDROID__)
2903static
2904std::string
2905get_version()
2906{
2907 auto path = get_tz_dir() + std::string("/+VERSION");
2908 std::ifstream in{path};
2909 std::string version;
2910 if (in)
2911 {
2912 in >> version;
2913 return version;
2914 }
2915 in.clear();
2916 in.open(get_tz_dir() + std::string(1, folder_delimiter) + "version");
2917 if (in)
2918 {
2919 in >> version;
2920 return version;
2921 }
2922 version = "unknown";
2923 return version;
2924}
2925
2926static
2927std::vector<leap_second>

Callers 1

init_tzdbFunction · 0.85

Calls 1

file_existsFunction · 0.85

Tested by

no test coverage detected