Back and forth UTC dates in lua
问题 I'm having problems converting a lua date to a timestamp and then obtaining back the original date from it. It does work for non UTC dates, but not with UTC. Currently my example code is: local dt1 = os.date( "*t" ); print( dt1.hour ); local dt2 = os.date( "*t", os.time( dt1 ) ); print( dt2.hour ); print( "-=-=-" ); local dt1 = os.date( "!*t" ); print( dt1.hour ); local dt2 = os.date( "!*t", os.time( dt1 ) ); print( dt2.hour ); local dt2 = os.date( "*t", os.time( dt1 ) ); print( dt2.hour );