import time


def CreatePastDate(secs):
    """
create a date shifted of 'secs' 
seconds respect to 'now' compatible with mysql queries
Note that using positive 'secs' you'll get a 'future' time!
    """
    T=time.time()+time.timezone+secs
    tup=time.gmtime(T)
    #when="%d-%d-%d %d:%d:%d"%(tup[0],tup[1],tup[2],tup[3],tup[4],tup[5])
    when="%d-%d-%d %d:%d:%d"%tup[0:6]
    return when