From WikiChip
Difference between revisions of "mirc/identifiers/$timezone"
m |
(Incorrect reference to $daylight twice when meant $timezone) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | {{mirc title|$timezone identifier}}'''$timezone''' returns the current timezone setting in seconds. | + | {{mirc title|$timezone identifier}}'''$timezone''' returns the current timezone setting in seconds. Positive is West/Earlier than UTC, negative is East/Later than UTC. |
− | |||
− | |||
== Synopsis == | == Synopsis == | ||
<pre>$timezone</pre> | <pre>$timezone</pre> | ||
Line 10: | Line 8: | ||
== Properties == | == Properties == | ||
None | None | ||
+ | |||
+ | == Notes == | ||
+ | * $timezone contains the seconds to subtract from UTC to match your computer clock time. | ||
+ | * i.e. $gmt($ctime) == $asctime($calc($ctime + $timezone)), and $asctime($calc(0 + $timezone)) is "Thu Jan 01 00:00:00 1970" except for people whose $timezone is negative because $asctime does not accept negative time values. | ||
+ | * When you change your computer's timezone, the file date/times change, but mIRC's $ctime does not. $file($mircexe).mtime remains the same regardless of $timezone and $daylight values. | ||
+ | * $timezone changes when $daylight changes, so you'll find $timezone + $daylight remain the same total. In USA Eastern, you'll find that during the winter, $timezone is 18000 and $daylight is 0. In summer during Daylight/Summertime, $timezone drops by 3600 to 14400, and $daylight increases from 0 to 3600. | ||
== Example == | == Example == | ||
Line 19: | Line 23: | ||
== See also == | == See also == | ||
* {{mIRC|$timestampfmt}} | * {{mIRC|$timestampfmt}} | ||
+ | * {{mIRC|$daylight}} | ||
+ | * {{mIRC|$gmt}} | ||
+ | * {{mIRC|$asctime}} | ||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
[[Category:mIRC identifiers|timezone]] | [[Category:mIRC identifiers|timezone]] |
Latest revision as of 11:44, 9 September 2018
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$timezone returns the current timezone setting in seconds. Positive is West/Earlier than UTC, negative is East/Later than UTC.
Synopsis[edit]
$timezone
Parameters[edit]
None
Properties[edit]
None
Notes[edit]
- $timezone contains the seconds to subtract from UTC to match your computer clock time.
- i.e. $gmt($ctime) == $asctime($calc($ctime + $timezone)), and $asctime($calc(0 + $timezone)) is "Thu Jan 01 00:00:00 1970" except for people whose $timezone is negative because $asctime does not accept negative time values.
- When you change your computer's timezone, the file date/times change, but mIRC's $ctime does not. $file($mircexe).mtime remains the same regardless of $timezone and $daylight values.
- $timezone changes when $daylight changes, so you'll find $timezone + $daylight remain the same total. In USA Eastern, you'll find that during the winter, $timezone is 18000 and $daylight is 0. In summer during Daylight/Summertime, $timezone drops by 3600 to 14400, and $daylight increases from 0 to 3600.
Example[edit]
//echo -a $timezone
Compatibility[edit]
Added: mIRC v5.1
Added on: 28 Aug 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC identifier list