![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
datetimeutc
A Python datetime wrapper so we can forget about timezones
A lightweight datetime utility library which wraps around the standard datetime
module, with features from dateutil and pytz.
Its purpose is to minimize the effort to convert datetime to/from UTC, a task I found myself doing too often while scaling web services and apps internationally.
This wrapper is designed under these datetime philosophy:
Install
$ pip install datetimeutc
Usage
The library provides thinly wrappers of datetime classes, e.g. datetime, date, and time.
Instances of these class are created with timezone awareness in UTC time. Users can also pass in None
or other timezone, which the library will automatically converts into UTC time.
from datetimeutc import Datetime, Date, Time import pytz d = Datetime(2016, 3, 21, 9, 20, 40) Datetime(2016, 3, 21, 9, 20, 40, tzinfo=) Datetime(2016, 3, 21, 9, 20, 40, tzinfo=pytz.timezone('US/Eastern')) Datetime(2016, 3, 21, 14, 16, 40, tzinfo=)
Functions of datetime are all supported.
from datetimeutc import Datetime, Date, Time Datetime.now() Datetime(2016, 3, 21, 9, 20, 40, 816025, tzinfo=) Datetime.now().dst()
datetime.timedelta(0) Datetime.now().timetuple() time.struct_time(tm_year=2016, tm_mon=3, tm_mday=21, tm_hour=9, tm_min=7, tm_sec=47, tm_wday=0, tm_yday=81, tm_isdst=0) Datetime.now().toordinal() 736044 Datetime.now().isoweekday() 1 Datetime.now().isoformat() '2016-03-21T09:08:17.488494+00:00' Datetime.strptime('2016-03-21','%Y-%m-%d') Datetime(2016, 3, 21, 0, 0, tzinfo=) datetimeutc.Datetime(2016, 3, 21, 9, 20, 40).astimezone(pytz.timezone('US/Eastern')) datetime.datetime(2016, 3, 21, 5, 20, 40, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
Utilities
Other datetime functions are available for common tasks, e.g. converting to/from javascript timestamp
import datetimeutc, datetime datetimeutc.to_utc(datetime.datetime.now()) datetime.datetime(2016, 3, 21, 9, 31, 8, 455166, tzinfo=) d = datetimeutc.Datetime(2016, 3, 21, 9, 20, 40) d Datetime(2016, 3, 21, 9, 20, 40, tzinfo=) d.timestamp 1458552040 d.jstimestamp 1458552040000.0 datetimeutc.Datetime.from_jstimestamp(d.jstimestamp) Datetime(2016, 3, 21, 9, 20, 40, tzinfo=)
FAQs
Because why are we dealing with timezones?
We found that datetimeutc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.