• Kazuhiko Shiozaki's avatar
    use DateTime(str(DateTime().earliestTime() + gap)) instead of · f14e5ad2
    Kazuhiko Shiozaki authored
    (DateTime().earliestTime() + gap).earliestTime(), since
    DateTime().__add__() returns a different tz offset if daylight saving
    changes.
    
    For example (timezone is Europe/Paris):
    
    >>> DateTime().earliestTime()
    DateTime('2008/10/24')
    >>> DateTime().earliestTime()._tz
    'GMT+2'
    >>> (DateTime().earliestTime()+10)
    DateTime('2008/11/03')
    >>> (DateTime().earliestTime()+10)._tz
    'GMT+2'
    >>> DateTime(str((DateTime().earliestTime()+10)))
    DateTime('2008/11/03')
    >>> DateTime(str((DateTime().earliestTime()+10)))._tz
    'GMT+1'
    
    
    git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24312 20353a03-c40f-0410-a6d1-a30d3c3de9de
    f14e5ad2
testOrderBuilder.py 14.7 KB