Jump to content

Cygwin time confusion


Recommended Posts

Hello. I have a little problem. If I start an AutoIT script using cygwin, @HOUR doesn't recognize daylight saving time.

Simple example:

Msg(0,"",@HOUR)

When i run it by "hand" from Windows UI, it show's 16, running by cygwin it returns 15. When I'll run "date" command in ssh window, it's showing correct value so I doubt that it's problem in cygwin by itself.

Any solutions to the problem? Thanks in advance.

 

PS: Research

#include <Date.au3>

Local $lNowCalc = _NowCalc()
Local $lLocalTime = _Date_Time_GetLocalTime()
Local $lSystemTime = _Date_Time_GetSystemTime()


Local $lString = "NowCalc: " & $lNowCalc & @CRLF
$lString &= "Local Time: " & _Date_Time_SystemTimeToDateTimeStr($lLocalTime) & @CRLF
$lString &= "System Time: " & _Date_Time_SystemTimeToDateTimeStr($lSystemTime) & @CRLF

ClipPut($lString)

Output (manual):

NowCalc: 2015/05/11 16:21:40
Local Time: 05/11/2015 16:21:40
System Time: 05/11/2015 14:21:40

 

Output (via cygwin ssh):

NowCalc: 2015/05/11 15:22:00
Local Time: 05/11/2015 16:22:00
System Time: 05/11/2015 14:22:00

Edited by Tormiasz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...