jp (base): new date_decoder to specify dates in arguments
This commit is contained in:
parent
4b81275fdf
commit
31eae6db71
1 changed files with 5 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ from sat_frontends.tools.jid import JID
|
|||
from sat.tools import config
|
||||
from sat.tools.common import dynamic_import
|
||||
from sat.tools.common import uri
|
||||
from sat.tools.common import date_utils
|
||||
from sat.core import exceptions
|
||||
import sat_frontends.jp
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
|
|
@ -137,6 +138,10 @@ def unicode_decoder(arg):
|
|||
return arg.decode(locale.getpreferredencoding())
|
||||
|
||||
|
||||
def date_decoder(arg):
|
||||
return date_utils.date_parse_ext(arg, default_tz=date_utils.TZ_LOCAL)
|
||||
|
||||
|
||||
class Jp(object):
|
||||
"""
|
||||
This class can be use to establish a connection with the
|
||||
|
|
|
|||
Loading…
Reference in a new issue