Mailing list archives: August 2008

Site index · List index
Message listThread · Author · Date
backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html>
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
safoundation.org    backup = test_tzinfo + if icuTzinfo is None and backup is not None: + icuTzinfo = backup + if tzical_tzid is not None: + tzid_mapping[tzical_tzid] = icuTzinfo + # if we have an unknown timezone, we'll return floating + return TimeZone.floating if icuTzinfo is None else icuTzinfo + +def force_datetime(dt, tzinfo=None): + """ + If dt is a datetime, return dt, if a date, add time(0) and return. + + @param dt: The input. + @type dt: C{datetime} or C{date} + + @return: A C{datetime} + """ + if tzinfo is None: + tzinfo = TimeZone.floating + if type(dt) == datetime: + if dt.tzinfo is None: + return dt.replace(tzinfo=tzinfo) + else: + return dt + elif type(dt) == date: + return datetime.combine(dt, time(0, tzinfo=tzinfo)) </ins></span></pre> </div> </div> </body> </html> Mon, 11 Apr, 05:03
Message listThread · Author · Date
Box list
Feb 20095
Nov 20082
Oct 20086
Sep 200845
Aug 200818
Jul 200888
Jun 2008151
May 2008126
Apr 2008152
Mar 2008104
Feb 2008141
Jan 200859
Dec 2007162
Nov 2007203
Oct 2007280
Sep 2007296
Aug 2007253
Jul 2007358
Jun 2007358
May 2007276
Apr 2007298
Mar 2007195
Feb 2007246
Jan 2007350
Dec 2006240
Nov 2006204
Oct 2006187
Sep 2006182
Aug 200639
Jul 200611
Jun 200668
May 200697
Apr 200692
Mar 2006109
Feb 2006126
Jan 2006105
Dec 2005141
Nov 200593
Oct 200570
Sep 200588
Aug 2005100
Jul 200571
Jun 200517