Comments (6)
Could you execute the following in both cases?
>>> from pendulum.tz import LocalTimezone
>>> print(LocalTimezone.get_local_tz_name())
from pendulum.
Windows
>>> from pendulum.tz import LocalTimezone
>>> print(LocalTimezone.get_local_tz_name())
Australia/Sydney
Unix
>>> from pendulum.tz import LocalTimezone
>>> print(LocalTimezone.get_local_tz_name())
<Timezone [Australia/Sydney]>
i have a local copy of this repo to fix 8976633 as it wasn't in pip at the time. my local copy at this commit is working, seems it was broken sometime after this commit.
from pendulum.
OK. So it seems datetime.utcfromtimestamp()
does not accept negative timestamps on Windows for some reason. It works fine on other systems.
I will try to make a workaround to fix this.
from pendulum.
I just pushed a fix on master
that should fix the issue.
Can you test it and confirm?
from pendulum.
thanks @sdispater, that looks to have fixed the issue.
(.env) C:\projects\timetracking\primetime\pendulum (master)
λ git log -1
commit 5b90e397e440c27673b2dd4332745dd5f70c95a1
Author: Sébastien Eustace <[email protected]>
Date: Tue Sep 20 23:56:49 2016 -0500
Fixes Loader class on Windows.
(.env) C:\projects\timetracking\primetime\pendulum (master)
λ python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pendulum
>>> pendulum.now()
<Pendulum [2016-09-21T15:05:53.545422+10:00]>
>>>
from pendulum.
Version 0.6.2
is out with the fix included.
from pendulum.
Related Issues (20)
- to_iso8601_string
- instance() fails for datetimes with pytz.FixedOffsets
- "import pendulum" causes unwanted import of pytest (presence of pytest in sys.modules often used to control Python behaviour) HOT 2
- MMM is not case-insensitive like Java
- If you have the /etc/timezone file set to a timezone string, pendulum.UTC has that timezone's utcoffset instead of None HOT 1
- in_words() exclude week
- timedelta additions to pendulum.DateTime HOT 1
- extreme slow down in `in_tz` after upgrading from 2.1.2 to 3.0.0 HOT 3
- Day of week constants
- pendulum.instance & dateutil.tz compatibility
- Localized Format LT inconsistent with leading zeroes
- Default string representation is not iso anymore HOT 1
- Add DateTime to typing for diff()
- Cannot install version 2.x via pip because of dead link for get-poetry.py in build-wheels.sh HOT 1
- IsADirectoryError in datetime.py
- DeprecationWarning about datetime.utcfromtimestamp in Python-3.12
- Flexget install Raspberry PI ! HOT 3
- Bugs in `Duration` edge cases
- Remove deprecated datetime.datetime.utcfromtimestamp HOT 1
- v2.8.1 broke Pendulum math and timezone awareness 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 pendulum.