summaryrefslogtreecommitdiffstats
path: root/src/common/time_zone.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rework time service to fix time passing offline.Kelebek12024-01-241-1/+11
|
* time_zone: Clean up includeslat9nq2023-07-121-1/+1
|
* time_zone: Swap subtraction orderlat9nq2023-07-121-1/+1
|
* time_zone: Account for leap yearslat9nq2023-07-121-4/+6
| | | | | Protects against invalid hour offsets during transitions to years following leap years.
* time_zone: Remove string ops for determing zonelat9nq2023-07-101-27/+16
| | | | | | | | | 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.
* time_zone: Handle offset time zoneslat9nq2023-06-051-38/+26
| | | | | | | | time_zone: Remove maybe_unused time_zone: Use s64 storages time_zone: Catch by reference
* common: Move system time zone string detectionlat9nq2023-06-051-4/+71
| | | | | | | | | | | | 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.
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | 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.
* Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"bunnei2020-08-201-5/+9
|
* common/time_zone: Simplify GetOsTimeZoneOffset()Lioncash2020-08-161-9/+5
| | | | | | | 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.
* time_zone: Use std::chrono::seconds for strong typing.bunnei2020-05-131-2/+2
|
* common: Add module to get the current time zone.bunnei2020-05-111-0/+49