AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

v1.0.48.3 - Time variable string?

 
Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
silveredge78



Joined: 25 Jul 2006
Posts: 481
Location: Midwest, USA

PostPosted: Mon Jul 20, 2009 7:32 pm    Post subject: v1.0.48.3 - Time variable string? Reply with quote

I'm not sure how, but this is a clip from an old script that worked as I needed when compiled using 1.0.47.x. I upgraded to 1.0.48.3, and needed to recompile this original script for testing. It kept skipping filling out a particular value. I am pretty sure I've limited it to this code:

Code:
...

      StringGetPos, Pos_Date, A_LoopField, %A_Space%, L3
      StringGetPos, Pos_Time, A_LoopField, %A_Space%, L4

...

    Time := SubStr(A_LoopField,Pos_Date + 1,Pos_Time - Pos_Date + 1)
    Time = %Time%
    Time = 00000000%Time%
    StringReplace, Time, Time, :, , All
    FormatTime, Time, %Time%, h:mm tt

...

It is not the upx changing from v3.0 to v3.3, as I have tried using the old compiler with both upx versions and it works fine. But, when I use the new compiler with either upx, it comes up empty.

Any ideas? This is an important script and I'd rather not have to rewrite it if this is a bug and can be fixed. In the meantime, I just compiled it with the v 1.0.47.x compiler.
_________________
SilverEdge78
Back to top
View user's profile Send private message
nick



Joined: 24 Aug 2005
Posts: 549
Location: Berlin / Germany

PostPosted: Tue Jul 21, 2009 1:18 pm    Post subject: Reply with quote

Changelog for 1.0.48 wrote:
Changed and fixed "if var is time" and other uses of YYYYMMDDHHMISS date-time stamps to recognize that months outside the range 1-12 are invalid. [thanks Nick]

Code:
Time = 000001001748
FormatTime, Time, %Time%, h:mm tt
MsgBox, %Time%

_________________
nick Wink
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Fri Sep 18, 2009 12:51 am    Post subject: Reply with quote

The change to FormatTime was unintentional because it is documented that, "If the date and/or time portion of the timestamp is invalid -- such as February 29th of a non-leap year -- the date and/or time will be omitted from OutputVar."

Therefore the next release will have the following fix: "Fixed FormatTime to yield a valid time of day even when the specified month is out-of-range (broken by 1.0.48.00)."

Thanks for reporting it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group