From WikiChip
Difference between revisions of "mirc/identifiers/$timezone"
m |
Maroonbells (talk | contribs) (Add'l Info) |
||
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, $daylight is 18000 and $daylight is 0. In summer during Daylight/Summertime, $daylight 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]] |
Revision as of 02:08, 9 December 2017
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
$timezone
Parameters
None
Properties
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, $daylight is 18000 and $daylight is 0. In summer during Daylight/Summertime, $daylight drops by 3600 to 14400, and $daylight increases from 0 to 3600.
Example
//echo -a $timezone
Compatibility
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
mIRC identifier list