Well, for me, "-0,5" works as it always has and takes off 30min. "-00.30" takes off 6min and "-00:30" does the same.
Also, on an unrelated note, I used to have the auto-update bug and it turned out to be because your earliest version of the script used a file called "Timezone.js" which set the version to something old on startup, and when I auto-updated, your main functions moved to "Main.js", but "Timezone.js" was never deleted, and hence the script thought it was still that old version.
EDIT: Debug log:
code:
Settings::OnEvent_ChatWndSendMessage {
$ChatWnd = 2426400
$Message = "/tzSetGMT -00:30"
var IsCommand = true
var Command = "setgmt"
var Params = "-00:30"
//Evaluating "setgmt" with Params: "-00:30"
var Email = "email@domain.com"
var GMTs = "-00.30"
var GMT = -0.1
(GMT != 0): true
Main::UpdateButton {
$ChatWnd = 2426400
(ChatWnd.Contacts.Count == 1): true
Main::AddButton {
$ChatWnd = 2426400
var SignedIn = true
(ChatWnds[ChatWnd.Handle] == undefined): false
var ChildWnd = 1967468
var Result = 1 //SetWindowPos call
var ChildWnd.Visible = true
}
}
//Command "setgmt" processed with Params: -00:30
}
EDIT:
code:
var GMT = (Minutes != undefined) ? 1 * ("" + Hours + "." + Math.round(Minutes / 60)) : 1 * Hours
"Math.round()" rounds to the nearest integer. What you want is something like "Number.toFixed()" to round decimals. This works:
code:
("" + Hours + "." + (Minutes / 60).toFixed(2).substr(2))