Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
73
Issues
73
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
8c0516be
Commit
8c0516be
authored
Oct 12, 2017
by
Steffen Michels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapted to non-pure 'mkTime' & added conversion functions for UTC DateTime to Timestamp
parent
1ef5f3ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
6 deletions
+32
-6
Libraries/iTasks/Engine.icl
Libraries/iTasks/Engine.icl
+1
-1
Libraries/iTasks/Extensions/DateTime.dcl
Libraries/iTasks/Extensions/DateTime.dcl
+16
-0
Libraries/iTasks/Extensions/DateTime.icl
Libraries/iTasks/Extensions/DateTime.icl
+14
-4
Libraries/iTasks/Internal/IWorld.icl
Libraries/iTasks/Internal/IWorld.icl
+1
-1
No files found.
Libraries/iTasks/Engine.icl
View file @
8c0516be
...
...
@@ -228,7 +228,7 @@ determineAppPath world
=
(
currentDirectory
</>
(
fst
o
hd
o
sortBy
cmpFileTime
)
(
zip2
batchfiles
infos
),
world
)
where
cmpFileTime
(_,
Ok
{
FileInfo
|
lastModifiedTime
=
x
})
(_,
Ok
{
FileInfo
|
lastModifiedTime
=
y
})
=
mkTime
x
>
mkTime
y
(_,
Ok
{
FileInfo
|
lastModifiedTime
=
y
})
=
timeGm
x
>
timeGm
y
//By default, we use the modification time of the applaction executable as version id
determineAppVersion
::
!
FilePath
!*
World
->
(!
String
,!*
World
)
...
...
Libraries/iTasks/Extensions/DateTime.dcl
View file @
8c0516be
...
...
@@ -92,6 +92,22 @@ localDateToTimestamp :: !Date -> Task Timestamp
* @return The resulting timestamp
*/
localDateTimeToTimestamp
::
!
DateTime
->
Task
Timestamp
/**
* Converts a UTC Date to a timestamp.
*
* @param Date: The date to convert
*
* @return The resulting timestamp
*/
utcDateToTimestamp
::
!
Date
->
Timestamp
/**
* Converts a UTC DateTime to a timestamp.
*
* @param Date: The date & time to convert
*
* @return The resulting timestamp
*/
utcDateTimeToTimestamp
::
!
DateTime
->
Timestamp
/*** Special wait tasks ***/
...
...
Libraries/iTasks/Extensions/DateTime.icl
View file @
8c0516be
...
...
@@ -196,14 +196,24 @@ where
localDateToTimestamp
::
!
Date
->
Task
Timestamp
localDateToTimestamp
{
Date
|
day
,
mon
,
year
}
=
mkInstantTask
localDateToTimestamp`
where
localDateToTimestamp`
_
iworld
=
(
Ok
(
mkTime
{
Tm
|
sec
=
0
,
min
=
0
,
hour
=
0
,
mday
=
day
,
mon
=
mon
-
1
,
year
=
year
-
1900
,
wday
=
0
,
yday
=
0
,
isdst
=
-1
}),
iworld
)
localDateToTimestamp`
_
iworld
=:{
world
}
#
(
ts
,
world
)
=
mkTime
{
Tm
|
sec
=
0
,
min
=
0
,
hour
=
0
,
mday
=
day
,
mon
=
mon
-
1
,
year
=
year
-
1900
,
wday
=
0
,
yday
=
0
,
isdst
=
-1
}
world
=
(
Ok
ts
,
{
iworld
&
world
=
world
})
localDateTimeToTimestamp
::
!
DateTime
->
Task
Timestamp
localDateTimeToTimestamp
{
DateTime
|
day
,
mon
,
year
,
hour
,
min
,
sec
}
=
mkInstantTask
localDateTimeToTimestamp`
where
localDateTimeToTimestamp`
_
iworld
=
(
Ok
(
mkTime
{
Tm
|
sec
=
sec
,
min
=
min
,
hour
=
hour
,
mday
=
day
,
mon
=
mon
-
1
,
year
=
year
-
1900
,
wday
=
0
,
yday
=
0
,
isdst
=
-1
}),
iworld
)
localDateTimeToTimestamp`
_
iworld
=:{
world
}
#
(
ts
,
world
)
=
mkTime
{
Tm
|
sec
=
sec
,
min
=
min
,
hour
=
hour
,
mday
=
day
,
mon
=
mon
-
1
,
year
=
year
-
1900
,
wday
=
0
,
yday
=
0
,
isdst
=
-1
}
world
=
(
Ok
ts
,
{
iworld
&
world
=
world
})
utcDateToTimestamp
::
!
Date
->
Timestamp
utcDateToTimestamp
{
Date
|
day
,
mon
,
year
}
=
timeGm
{
Tm
|
sec
=
0
,
min
=
0
,
hour
=
0
,
mday
=
day
,
mon
=
mon
-
1
,
year
=
year
-
1900
,
wday
=
0
,
yday
=
0
,
isdst
=
-1
}
utcDateTimeToTimestamp
::
!
DateTime
->
Timestamp
utcDateTimeToTimestamp
{
DateTime
|
day
,
mon
,
year
,
hour
,
min
,
sec
}
=
timeGm
{
Tm
|
sec
=
sec
,
min
=
min
,
hour
=
hour
,
mday
=
day
,
mon
=
mon
-
1
,
year
=
year
-
1900
,
wday
=
0
,
yday
=
0
,
isdst
=
-1
}
waitForTime
::
!
Time
->
Task
Time
waitForTime
time
=
...
...
Libraries/iTasks/Internal/IWorld.icl
View file @
8c0516be
...
...
@@ -108,7 +108,7 @@ determineAppPath world
=
(
currentDirectory
</>
(
fst
o
hd
o
sortBy
cmpFileTime
)
(
zip2
batchfiles
infos
),
world
)
where
cmpFileTime
(_,
Ok
{
FileInfo
|
lastModifiedTime
=
x
})
(_,
Ok
{
FileInfo
|
lastModifiedTime
=
y
})
=
mkTime
x
>
mkTime
y
(_,
Ok
{
FileInfo
|
lastModifiedTime
=
y
})
=
timeGm
x
>
timeGm
y
destroyIWorld
::
!*
IWorld
->
*
World
destroyIWorld
iworld
=:{
IWorld
|
world
}
=
world
...
...
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