to_json converts to UTC when encoding ISO formatted datetimes (original) (raw)

Skip to content

Sign in

Appearance settings

View all features

View all solutions

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Sign in

Sign up

Appearance settings

pandas-dev / pandas Public

Additional navigation options

New issue

New issue

Open

Open

to_json converts to UTC when encoding ISO formatted datetimes

#12997

Labels

BugIO JSONread_json, to_json, json_normalizeTimezonesTimezone data dtype

@Komnomnomnom

Description

@Komnomnomnom

Komnomnomnom

opened

on Apr 26, 2016

Code Sample


In [99]: ts = Timestamp('2013-01-10 00:00:00-0500', tz='US/Eastern')

In [100]: pd.io.json.dumps(ts, iso_dates=True)
Out[100]: '"2013-01-10T05:00:00.000Z"'

Expected Output

In [100]: pd.io.json.dumps(ts, iso_dates=True)
Out[100]: '"2013-01-10T00:00:00.000-05:00"'

cf

In [109]: ts.isoformat()
Out[109]: '2013-01-10T00:00:00-05:00'

Metadata

Metadata

Assignees

No one assigned

Labels

BugIO JSONread_json, to_json, json_normalizeTimezonesTimezone data dtype

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions