Skip to content
Snippets Groups Projects
Commit 6716aea8 authored by Patrik Paško's avatar Patrik Paško
Browse files

- ToUnixTimestamp method

parent e729b507
No related branches found
No related tags found
1 merge request!1Develop
using System;
namespace tUtils
{
public class Class1
{
}
}
using System;
namespace tUtils
{
public static class Utils
{
public static long ToUnixTimestamp(this DateTime date)
{
TimeSpan span = (date.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc));
return (long)span.TotalMilliseconds;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment