Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
958e2eb9
Commit
958e2eb9
authored
Nov 10, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert date into milliseconds instead of seconds
parent
067d2a53
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
plugin.xml
plugin.xml
+2
-1
Request.java
src/android/notification/Request.java
+3
-3
APPNotificationOptions.m
src/ios/APPNotificationOptions.m
+1
-1
Trigger.cs
...Proxy/LocalNotificationProxy/LocalNotification/Trigger.cs
+1
-1
local-notification-util.js
www/local-notification-util.js
+1
-1
No files found.
plugin.xml
View file @
958e2eb9
...
@@ -234,10 +234,11 @@
...
@@ -234,10 +234,11 @@
<!-- windows -->
<!-- windows -->
<platform
name=
"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/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/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"/>
<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"
>
<js-module
src=
"src/windows/LocalNotificationProxy.js"
name=
"LocalNotification.Proxy"
>
<merges
target=
""
/>
<merges
target=
""
/>
</js-module>
</js-module>
...
...
src/android/notification/Request.java
View file @
958e2eb9
...
@@ -241,13 +241,13 @@ public final class Request {
...
@@ -241,13 +241,13 @@ public final class Request {
*/
*/
private
Date
getBaseDate
()
{
private
Date
getBaseDate
()
{
if
(
spec
.
has
(
"at"
))
{
if
(
spec
.
has
(
"at"
))
{
return
new
Date
(
1000
*
spec
.
optLong
(
"at"
,
0
));
return
new
Date
(
spec
.
optLong
(
"at"
,
0
));
}
else
}
else
if
(
spec
.
has
(
"firstAt"
))
{
if
(
spec
.
has
(
"firstAt"
))
{
return
new
Date
(
1000
*
spec
.
optLong
(
"firstAt"
,
0
));
return
new
Date
(
spec
.
optLong
(
"firstAt"
,
0
));
}
else
}
else
if
(
spec
.
has
(
"after"
))
{
if
(
spec
.
has
(
"after"
))
{
return
new
Date
(
1000
*
spec
.
optLong
(
"after"
,
0
));
return
new
Date
(
spec
.
optLong
(
"after"
,
0
));
}
else
{
}
else
{
return
new
Date
();
return
new
Date
();
}
}
...
...
src/ios/APPNotificationOptions.m
View file @
958e2eb9
...
@@ -338,7 +338,7 @@
...
@@ -338,7 +338,7 @@
{
{
double
timestamp
=
[[
self
valueForTriggerOption
:
@"at"
]
doubleValue
];
double
timestamp
=
[[
self
valueForTriggerOption
:
@"at"
]
doubleValue
];
return
[
NSDate
dateWithTimeIntervalSince1970
:
timestamp
];
return
[
NSDate
dateWithTimeIntervalSince1970
:
(
timestamp
/
1000
)
];
}
}
/**
/**
...
...
src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Trigger.cs
View file @
958e2eb9
...
@@ -390,7 +390,7 @@ namespace LocalNotificationProxy.LocalNotification
...
@@ -390,7 +390,7 @@ namespace LocalNotificationProxy.LocalNotification
/// <returns>The date time</returns>
/// <returns>The date time</returns>
private
DateTime
GetDateTime
(
long
time
)
private
DateTime
GetDateTime
(
long
time
)
{
{
return
DateTimeOffset
.
FromUnixTimeMilliseconds
(
time
*
1000
).
LocalDateTime
;
return
DateTimeOffset
.
FromUnixTimeMilliseconds
(
time
).
LocalDateTime
;
}
}
}
}
...
...
www/local-notification-util.js
View file @
958e2eb9
...
@@ -204,7 +204,7 @@ exports.convertTrigger = function (options) {
...
@@ -204,7 +204,7 @@ exports.convertTrigger = function (options) {
var
dateToNum
=
function
(
date
)
{
var
dateToNum
=
function
(
date
)
{
var
num
=
typeof
date
==
'object'
?
date
.
getTime
()
:
date
;
var
num
=
typeof
date
==
'object'
?
date
.
getTime
()
:
date
;
return
Math
.
round
(
num
/
1000
);
return
Math
.
round
(
num
);
};
};
if
(
!
options
.
trigger
)
if
(
!
options
.
trigger
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment