Skip to content

Why does GetCurrentUtcOffset uses now ? #50

@CharlieDuga

Description

@CharlieDuga

Hi,

Thank you for your amazing work, it's very useful.

I have a suggestion about your tzdb.pas library.
I have UTC time and a timezone name as input. I'd like to retrieve the offset between UTC and the timezone, without being machine-dependent.
The GetUtcOffset function seems suitable for this, but it takes a local time as input, not a UTC time. I don't understand why a local time is needed to find an offset between two other times.
I managed to get around this by giving it a local time as a parameter, which I recalculate from ToLocalTime and my UTC time.
It would be useful to be able to distinguish between two types of calls to GetUtcOffset, depending on whether the input is a local time or a UTC time.

Thank you in advance for your feedback.

Charlie

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions