1. OpenLib Tools

This module contains functions that could be useful.

1.1. Date and time tools

All these functions uses the OpenERP default timestamps by default as format.

openlib.tools.to_date(date_string, format=DEFAULT_SERVER_DATE_FORMAT)

Converts the date_string passed as an argument to a datetime.date object.

openlib.tools.to_time(time_string, format=DEFAULT_SERVER_TIME_FORMAT)

Converts the time_string argument to a datetime.time object.

openlib.tools.to_datetime(datetime_string, format=DEFAULT_SERVER_DATETIME_FORMAT)

Converts the datetime_string argument to a datetime.datetime object.