<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetTimeStamp</id>
	<title>API:GetTimeStamp - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetTimeStamp"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetTimeStamp&amp;action=history"/>
	<updated>2026-10-17T10:25:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetTimeStamp&amp;diff=30475&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetTimeStamp&amp;diff=30475&amp;oldid=prev"/>
		<updated>2026-10-16T19:45:10Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Time}}&lt;br /&gt;
Converts a local date and time to a Unix timestamp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestamp = GetTimeStamp(month, day, year, hour, minute)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;month : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Month, 1–12.&lt;br /&gt;
;day : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Day of the month.&lt;br /&gt;
;year : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Year, for example 2008.&lt;br /&gt;
;hour : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Hour, 0–23.&lt;br /&gt;
;minute : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Minute, 0–59.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;timestamp : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Seconds since 1 January 1970 (UTC) for that local date and time.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The date and time are taken as the computer&amp;#039;s local time. Seconds are always 0. The daylight-saving flag of the &amp;#039;&amp;#039;current&amp;#039;&amp;#039; local time is used for the conversion.&lt;br /&gt;
* All arguments are cut to whole numbers. &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt; keep only their lowest 8 bits (0–255) and &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt; its lowest 16 bits (0–65535).&lt;br /&gt;
* The values are not range-checked before the conversion.&lt;br /&gt;
* The result is returned as an unsigned 32-bit value.&lt;br /&gt;
* The function needs at least five arguments and only reads the last five.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when an argument is not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_guildwindow/source/guildwindowtabcalendar.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local paramTimeStamp = GetTimeStamp(month, day, year, 12, 0)&lt;br /&gt;
...&lt;br /&gt;
startTimeStamp = GetTimeStamp(data.startMonth, data.startDay, data.startYear, 0, 0)&lt;br /&gt;
endTimeStamp = GetTimeStamp(data.endMonth, data.endDay, data.endYear, 23, 59)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetEpochTime|GetEpochTime]]&lt;br /&gt;
* [[API:GetTodaysDate|GetTodaysDate]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>