Comments (2)
Most of the conversion / time zone errors have been fixed in my latest commit. Still remaining are the round-trip errors, and I'm not sure exactly yet what my approach to ambiguous instantiation or non-existent times will be. Addressed a few of the consistency issues in your gist as well.
* round-trip convert timestamp -> named timezone -> utc
expected 2002-10-27 05:30:00.000000 UTC+0000
got 10/27/02 06:30:00.0 +00:00 (UTC)
** convert utc datetime -> named timezone
expected 2002-10-27 01:30:00.000000 EDT-0400
got 10/27/02 01:30:00.0 -05:00 (EST)
* convert utc to local timezone
expected 2010-06-06 21:29:07.730000 MSD+0400
got 06/06/10 21:29:07.730000 +04:00 (MSD)
expected 2010-12-06 20:29:07.730000 MSK+0300
got 12/06/10 20:29:07.730000 +03:00 (MSK)
* date & time in named time zone
expected 2002-10-27 00:30:00.000000 EDT-0400
got 10/27/02 00:30:00.0 -04:00 (EDT)
* ambiguous: naive datetime to named timezone - no disambiguation
* non-existing times
* time zones in a distant past
expected 1915-08-04 22:59:59.000000 WMT+0124
got 08/04/15 22:59:59.0 +01:24 (WMT)
expected 1933-05-15 01:30:00.000000 AMT+0020
got 05/15/33 01:30:00.0 +00:20 (AMT)
expected 1933-05-15 03:30:00.000000 NST+0120
got 05/15/33 03:30:00.0 +01:20 (NST)
Thanks for the detailed assessment and test code, it was and continues to be extremely helpful.
from arrow.
I've updated the gist to mark (remove) fixed items. Current results:
* round-trip convert timestamp -> named timezone -> utc
expected 2002-10-27 05:30:00.000000 UTC+0000
got 10/27/02 06:30:00.0 +00:00 (UTC)
** convert utc datetime -> named timezone
expected 2002-10-27 01:30:00.000000 EDT-0400
got 10/27/02 01:30:00.0 -05:00 (EST)
* convert utc to local timezone
* date & time in named time zone
* ambiguous: naive datetime to named timezone - no disambiguation
* non-existing times
* time zones in a distant past
** seconds in utcoffset (pytz also fails here, datetime limitation)
Examples are from http://pytz.sourceforge.net/
The current failures might be due to the bug in dateutils see https://gist.github.com/3838828
from arrow.
Related Issues (20)
- Add "T" separator to FORMAT_RFC3339 HOT 2
- Pandas Timestamp from Arrow Object
- passing a parameter to Arrow.shift function (to check for imaginary times or not)
- Fuzzing arrow on OSS-Fuzz HOT 1
- Arrow.humanize() thinks past date is in the future HOT 3
- The dehumanize method doesn't recognize singular nouns HOT 5
- Cannot append nullable string columns to table
- Timezone in multiples of 4. HOT 1
- incorrect tzinfo when arrow.get() HOT 4
- 'arrow' has no attribute 'utcnow' HOT 1
- .humanize() should have a numeric option for 1 instead of a/an HOT 3
- error in Time transform of 9999-12-31 HOT 4
- arrow 1.2.3 doesn't run under Python 3.11 HOT 3
- Missing hour during DST long day when shifting or calculating ranges HOT 3
- No docs on values in format string for Arrow.format() HOT 2
- Use `typing.Self` to support subclassing
- Don't force requirement on types-python-dateutil HOT 3
- incorrect behavior WRT daylight savings for shift/adding timedelta
- 1.3.0: pytest fails in multiple units HOT 2
- RFE: use `zoneinfo` instead of `pytz` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrow.