Commit 958e2eb9 by Sebastián Katzer

Convert date into milliseconds instead of seconds

parent 067d2a53
......@@ -234,10 +234,11 @@
<!-- windows -->
<platform name="windows">
<!--
<framework src="src/windows/lib.UW/x86/LocalNotificationProxy.winmd" target-dir="x86" arch="x86" custom="true"/>
<framework src="src/windows/lib.UW/x64/LocalNotificationProxy.winmd" target-dir="x64" arch="x64" custom="true"/>
<framework src="src/windows/lib.UW/ARM/LocalNotificationProxy.winmd" target-dir="ARM" arch="ARM" custom="true"/>
-->
<js-module src="src/windows/LocalNotificationProxy.js" name="LocalNotification.Proxy" >
<merges target="" />
</js-module>
......
......@@ -241,13 +241,13 @@ public final class Request {
*/
private Date getBaseDate() {
if (spec.has("at")) {
return new Date(1000 * spec.optLong("at", 0));
return new Date(spec.optLong("at", 0));
} else
if (spec.has("firstAt")) {
return new Date(1000 * spec.optLong("firstAt", 0));
return new Date(spec.optLong("firstAt", 0));
} else
if (spec.has("after")) {
return new Date(1000 * spec.optLong("after", 0));
return new Date(spec.optLong("after", 0));
} else {
return new Date();
}
......
......@@ -338,7 +338,7 @@
{
double timestamp = [[self valueForTriggerOption:@"at"] doubleValue];
return [NSDate dateWithTimeIntervalSince1970:timestamp];
return [NSDate dateWithTimeIntervalSince1970:(timestamp / 1000)];
}
/**
......
......@@ -390,7 +390,7 @@ namespace LocalNotificationProxy.LocalNotification
/// <returns>The date time</returns>
private DateTime GetDateTime(long time)
{
return DateTimeOffset.FromUnixTimeMilliseconds(time * 1000).LocalDateTime;
return DateTimeOffset.FromUnixTimeMilliseconds(time).LocalDateTime;
}
}
......
......@@ -204,7 +204,7 @@ exports.convertTrigger = function (options) {
var dateToNum = function (date) {
var num = typeof date == 'object' ? date.getTime() : date;
return Math.round(num / 1000);
return Math.round(num);
};
if (!options.trigger)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment