Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

times

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

times - npm Package Compare versions

Comparing version
0.4
to
0.5
+1
-1
PKG-INFO
Metadata-Version: 1.0
Name: times
Version: 0.4
Version: 0.5
Summary: Times is a small, minimalistic, Python library for dealing with time conversions between universal time and arbitrary timezones.

@@ -5,0 +5,0 @@ Home-page: https://github.com/nvie/times/

@@ -5,2 +5,3 @@ import sys

def get_version():

@@ -14,9 +15,2 @@ basedir = os.path.dirname(__file__)

def get_dependencies():
deps = ['pytz']
if sys.version_info[0] == 3: # Python >= 3
deps.append('python-dateutil >= 2')
else:
deps.append('python-dateutil < 2')
return deps

@@ -38,3 +32,3 @@ setup(

platforms='any',
install_requires=get_dependencies(),
install_requires=['pytz', 'python-dateutil >= 2.1'],
classifiers=[

@@ -41,0 +35,0 @@ # As from http://pypi.python.org/pypi?%3Aaction=list_classifiers

Metadata-Version: 1.0
Name: times
Version: 0.4
Version: 0.5
Summary: Times is a small, minimalistic, Python library for dealing with time conversions between universal time and arbitrary timezones.

@@ -5,0 +5,0 @@ Home-page: https://github.com/nvie/times/

pytz
python-dateutil < 2
python-dateutil >= 2.1

@@ -10,3 +10,2 @@ import datetime

_default_fmt = '%Y-%m-%d %H:%M:%S%z'

@@ -90,10 +89,11 @@ def to_universal(local_dt, timezone=None):

"""Formats the given universal time for display in the given time zone."""
if fmt is None:
fmt = _default_fmt
if timezone is None:
raise ValueError('Please give an explicit timezone.')
return to_local(dt, timezone).strftime(fmt)
local = to_local(dt, timezone)
if fmt is None:
return local.isoformat()
else:
return local.strftime(fmt)
now = datetime.datetime.utcnow

@@ -1,1 +0,1 @@

VERSION = '0.4'
VERSION = '0.5'