TimeZone.h 1018 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string>
  4. namespace il2cpp
  5. {
  6. namespace os
  7. {
  8. class TimeZone
  9. {
  10. public:
  11. /*
  12. * This is heavily based on zdump.c from glibc 2.2.
  13. *
  14. * * data[0]: start of daylight saving time (in DateTime ticks).
  15. * * data[1]: end of daylight saving time (in DateTime ticks).
  16. * * data[2]: utcoffset (in TimeSpan ticks).
  17. * * data[3]: additional offset when daylight saving (in TimeSpan ticks).
  18. * * name[0]: name of this timezone when not daylight saving.
  19. * * name[1]: name of this timezone when daylight saving.
  20. *
  21. * FIXME: This only works with "standard" Unix dates (years between 1900 and 2100) while
  22. * the class library allows years between 1 and 9999.
  23. *
  24. * Returns true on success and zero on failure.
  25. */
  26. static bool GetTimeZoneData(int32_t year, int64_t data[4], std::string names[2], bool* daylight_inverted);
  27. };
  28. }
  29. }