Skip to content

Conversation

@hwc0919
Copy link
Collaborator

@hwc0919 hwc0919 commented Dec 11, 2024

No description provided.

@TDS07
Copy link

TDS07 commented Dec 8, 2025

Can we get this update for christmas :) ?

@hwc0919
Copy link
Collaborator Author

hwc0919 commented Dec 8, 2025

This pr is totally forgotten... Let me see

@hwc0919 hwc0919 force-pushed the feature/datetime-with-tz branch from cfb49e0 to d66a8de Compare December 9, 2025 07:24
@hwc0919
Copy link
Collaborator Author

hwc0919 commented Dec 9, 2025

New

Date::parseDatetimeTz() acts in this way:

  1. datetime string without tz, such as '2025-10-01 00:00:00', will be parsed as local time string.
    It works jusk like Date::fromDbStringLocal()

  2. datetime string with tz, such as '2025-10-01 00:00:00+8', will be parsed as a specific timepoint.

Neither fromDbString nor fromDbStringLocal would consider the tz part. Both of them can't handle such format correctly.

TODO

  • name?
  • support more format of ISO8601? such as T seperator

@TDS07
Copy link

TDS07 commented Dec 9, 2025

Hi, thanks for taking this rework so quickly !

In the first place, i wanted to use timezone with Tz from Drogon and the orm model for postgresql.
Most of my timestamp use iso8601 format.... so ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants