Skip to content

Conversation

@schloerke
Copy link
Collaborator

Followup to #1142 and #1143
Fixes #1144

>>> datetime.fromtimestamp(1, tz = timezone.utc)
datetime.datetime(1970, 1, 1, 0, 0, 1, tzinfo=datetime.timezone.utc)
>>> str(datetime.fromtimestamp(1, tz = timezone.utc))
'1970-01-01 00:00:01+00:00'

>>> pr = datetime.fromtimestamp(1, tz = timezone.utc).replace(tzinfo=None)
>>> pr
datetime.datetime(1970, 1, 1, 0, 0, 1)
>>> before = datetime.utcfromtimestamp(1)
datetime.datetime(1970, 1, 1, 0, 0, 1)

>>> str(pr)
'1970-01-01 00:00:01'
>>> before = datetime.utcfromtimestamp(1)
>>> str(before)
'1970-01-01 00:00:01'

@schloerke schloerke merged commit 0123f09 into main Feb 21, 2024
@schloerke schloerke deleted the utc_update3 branch February 21, 2024 15:18
schloerke added a commit that referenced this pull request Feb 22, 2024
* main:
  bug: Remove timezone info from `shiny.datetime` input handler (#1146)
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.

Consistent date time object

2 participants