summaryrefslogtreecommitdiff
path: root/src/common/time_zone.cpp
AgeCommit message (Collapse)Author
2024-01-24Rework time service to fix time passing offline.Kelebek1
2023-07-12time_zone: Clean up includeslat9nq
2023-07-12time_zone: Swap subtraction orderlat9nq
2023-07-12time_zone: Account for leap yearslat9nq
Protects against invalid hour offsets during transitions to years following leap years.
2023-07-10time_zone: Remove string ops for determing zonelat9nq
MinGW's strftime implementation does not work and cannot be used to determine the time zone. Besides that, the string operations are actually unnecessary since we can get the offset from std::localtime. Compare localtime to gmtime to find the zone offset on all platforms.
2023-06-05time_zone: Handle offset time zoneslat9nq
time_zone: Remove maybe_unused time_zone: Use s64 storages time_zone: Catch by reference
2023-06-05common: Move system time zone string detectionlat9nq
Moves it from Settings to Common::TimeZone, since this algorithm doesn't depend on the setting. It also lets us use it in other libraries. common: Various fixes time_zone: Don't double up the std::abs Too many absolute values were causing mirrored time zones to resolve as the same.
2022-04-23general: Convert source file copyright comments over to SPDXMorph
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2020-08-19Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"bunnei
2020-08-16common/time_zone: Simplify GetOsTimeZoneOffset()Lioncash
We can simplify this function down into a single line with the use of fmt. A benefit with the fmt approach is that the fmt variant of localtime is thread-safe as well, making GetOsTimeZoneOffset() thread-safe as well.
2020-05-12time_zone: Use std::chrono::seconds for strong typing.bunnei
2020-05-11common: Add module to get the current time zone.bunnei