aboutsummaryrefslogtreecommitdiff
path: root/src/common/time_zone.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* 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-191-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-121-2/+2
|
* common: Add module to get the current time zone.bunnei2020-05-111-0/+49