source:
trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/JavascriptUtils.cs
@
12428
Last change on this file since 12428 was 12428, checked in by ascheibe, 9 years ago | |
---|---|
File size: 361 bytes |
Rev | Line | |
---|---|---|
[12428] | 1 | using System; |
2 | ||
3 | namespace HeuristicLab.Services.WebApp.Status.WebApi { | |
4 | public static class JavascriptUtils { | |
5 | public static long ToTimestamp(DateTime input) { | |
6 | var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
7 | var time = input.Subtract(new TimeSpan(epoch.Ticks)); | |
8 | return (long)(time.Ticks / 10000); | |
9 | } | |
10 | } | |
11 | } |
Note: See TracBrowser
for help on using the repository browser.