Hey, Bishwajeet this side, Currently an undergrad student . I found this organization from the opensource google website and found this repo quite interesting. On going through the readme docs you wanted to run the cctz library in windows platform. I want to contribute to this . Can anyone guide me on how to get started ??
class TimeZoneIf {public:// A factory function for TimeZoneIf implementations.static std::unique_ptr<TimeZoneIf> Load(const std::string& name);virtual ~TimeZoneIf();virtual time_zone::absolute_lookup BreakTime(const time_point<seconds>& tp) const = 0;virtual time_zone::civil_lookup MakeTime(const civil_second& cs) const = 0;virtual bool NextTransition(const time_point<seconds>& tp,time_zone::civil_transition* trans) const = 0;virtual bool PrevTransition(const time_point<seconds>& tp,time_zone::civil_transition* trans) const = 0;virtual std::string Version() const = 0;virtual std::string Description() const = 0;};
Hey, Thanks for the follow-up . I need some help regarding setting up repo in my machine . As given in the readme files , one can either use bazel or cmake to build cctz library. I tried to install bazel but I couldn't in my device. so I used Cmake instead.
Now while running the commands , I received some following error related to google-test ( I have attached the following log files in this thread).
Determining if the include file pthread.h exists
'pthread.h': No such file or directory
'pwsh.exe' is not recognized as an internal or external command
bazel-1.2.1-windows-x86_64.exe test --test_env="TZDIR=%CD%\testdata\zoneinfo" :all \--test_output=errors --test_tag_filters=-benchmark --verbose_failures=true
Also , I went through the codebase and tried to understand what is being done actually. I have some doubts, Why this library doesn't work without zoneinfo files in the windows platform??

The default implementation of the cctz::TimeZoneIf interface, cctz::TimeZoneInfo, uses the data from the zoneinfo files to be able to map between civil and absolute times within a timezone. Without that data, it can't do that.Perhaps those files are available somewhere in a Windows distribution. I don't know, but if so we could teach cctz::TimeZoneInfo about that. Otherwise, the idea is to use whatever timezone data that does exist in Windows to create a new cctz::TimeZoneIf implementation. For example, can https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/ be used to do those mappings?
I tried to install Bazel once again (different method using chocolatey ) and it was a success .
I ran the following command " bazel test :all " this the output--
These Tests failed cause I don't have zoneinfo files right??
The default implementation of the cctz::TimeZoneIf interface, cctz::TimeZoneInfo, uses the data from the zoneinfo files to be able to map between civil and absolute times within a timezone. Without that data, it can't do that.Perhaps those files are available somewhere in a Windows distribution. I don't know, but if so we could teach cctz::TimeZoneInfo about that. Otherwise, the idea is to use whatever timezone data that does exist in Windows to create a new cctz::TimeZoneIf implementation. For example, can https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/ be used to do those mappings?Whatever seems the best approach , I will do my best to contribute in it.
It is hard to tell without looking at the log files (or adding the --test_output=errors flag so the failures are printed).
Alternatively, given that we include the zoneinfo files in the repo, you could add the --test_env="TZDIR=%CD%\testdata\zoneinfo" flag and see if things then pass.
I took a quick look at the timezoneapi.h functions, but couldn't quite tell whether they were up to the task.
It is hard to tell without looking at the log files (or adding the --test_output=errors flag so the failures are printed).I am attaching these log files to see if that can help you related to this contextAlternatively, given that we include the zoneinfo files in the repo, you could add the --test_env="TZDIR=%CD%\testdata\zoneinfo" flag and see if things then pass.By Adding this , the build was successful and those error were removed 🎉
I took a quick look at the timezoneapi.h functions, but couldn't quite tell whether they were up to the task.Do you want me to look someplace related to it? Which place I could get the related information??
Is there any header file related to timezoneapi.h you might know ??
Also I wanted to ask what exactly these zoneinfo files contain. I tried to take quick peek and found various folders of different countries that contains various files. but when I tried to open I really quite figure out the extension of file so it gave garbage stuffs. Just wanted to know what these files exactly contains