#2882: another attempt at fixing it that should also work on other platforms

This commit is contained in:
Günter Obiltschnig
2022-03-28 12:57:16 +02:00
parent 6aa29ade17
commit 2c15b93dee
6 changed files with 91 additions and 47 deletions

View File

@@ -38,6 +38,11 @@ public:
/// daylight saving time is in use.
/// local time = UTC + utcOffset() + dst().
static int dst(const Poco::Timestamp& timestamp);
/// Returns the daylight saving time offset in seconds if
/// daylight saving time is in use for the given time.
/// local time = UTC + utcOffset() + dst().
static bool isDst(const Timestamp& timestamp);
/// Returns true if daylight saving time is in effect
/// for the given time. Depending on the operating system
@@ -58,18 +63,6 @@ public:
static std::string dstName();
/// Returns the timezone name if daylight saving time is in effect.
#if !defined(POCO_OS_FAMILY_WINDOWS)
static int utcOffset(const Poco::Timestamp& timestamp);
/// Returns the offset of local time to UTC
/// for the given time, in seconds.
/// local time = UTC + utcOffset() + dst().
static int dst(const Poco::Timestamp& timestamp);
/// Returns the daylight saving time offset in seconds if
/// daylight saving time is in use for the given time.
/// local time = UTC + utcOffset() + dst().
#endif
};