mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 14:25:02 -05:00
Reset on every call of Datetime print function the format to default
This commit is contained in:
parent
1d7b904c50
commit
f137144bc7
@ -99,6 +99,11 @@ class sbdatetime(datetime.datetime):
|
|||||||
@static_or_instance
|
@static_or_instance
|
||||||
def sbftime(self, dt=None, show_seconds=False, t_preset=None):
|
def sbftime(self, dt=None, show_seconds=False, t_preset=None):
|
||||||
|
|
||||||
|
try:
|
||||||
|
locale.setlocale(locale.LC_TIME, '')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if sbdatetime.has_locale:
|
if sbdatetime.has_locale:
|
||||||
locale.setlocale(locale.LC_TIME, 'us_US')
|
locale.setlocale(locale.LC_TIME, 'us_US')
|
||||||
@ -133,6 +138,11 @@ class sbdatetime(datetime.datetime):
|
|||||||
@static_or_instance
|
@static_or_instance
|
||||||
def sbfdate(self, dt=None, d_preset=None):
|
def sbfdate(self, dt=None, d_preset=None):
|
||||||
|
|
||||||
|
try:
|
||||||
|
locale.setlocale(locale.LC_TIME, '')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
strd = ''
|
strd = ''
|
||||||
try:
|
try:
|
||||||
if self is None:
|
if self is None:
|
||||||
@ -153,6 +163,11 @@ class sbdatetime(datetime.datetime):
|
|||||||
@static_or_instance
|
@static_or_instance
|
||||||
def sbfdatetime(self, dt=None, show_seconds=False, d_preset=None, t_preset=None):
|
def sbfdatetime(self, dt=None, show_seconds=False, d_preset=None, t_preset=None):
|
||||||
|
|
||||||
|
try:
|
||||||
|
locale.setlocale(locale.LC_TIME, '')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
strd = ''
|
strd = ''
|
||||||
try:
|
try:
|
||||||
if self is None:
|
if self is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user