tea.cron

tea.cron.utils.convert_to_datetime(value)

Converts the given object to a datetime object, if possible. If an actual datetime object is passed, it is returned unmodified. If the value is a string, it is parsed as a datetime.

Date strings are accepted in three different forms: date only (Y-m-d), date with time (Y-m-d H:M:S) or with date+time with microseconds (Y-m-d H:M:S.micro).

Return type:datetime
tea.cron.utils.datetime_ceil(dateval)

Rounds the given datetime object upwards.

Project Versions

Previous topic

tea.console

Next topic

tea.ds

This Page