Skip to content

Logger local time doesn't automatically account for DST #318

@obiltschnig

Description

@obiltschnig

See http://pocoproject.org/forum/viewtopic.php?f=12&t=6016

Problem is this code in PatternFormatter::format:

Timestamp timestamp = msg.getTime();
if (_localTime)
{
    timestamp += Timezone::utcOffset()*Timestamp::resolution();
    timestamp += Timezone::dst()*Timestamp::resolution();
}

We call Timezone::dst(), which (on Linux) uses the DST offset obtained at program startup (internally, it uses the global timezone variable provided by the C library. This is not adjusted later on. OS X, BSD and Android do not seem to have this issue. See Timezone_UNIX.cpp

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions