In C# I would like to get UTC (+00:00) time as milliseconds. So I can use this in Javascript with offset(like below). I have tried several things but I did not achieve this.
new Date(1528204115692 - (new Date().getTimezoneOffset() * 60000)).toString()
Below code gives me milliseconds according to my timezone.
((DateTimeOffset)DateTime.UtcNow).ToUnixTimeMilliseconds()
I want to keep UTC time millisecond in db so I can show datetime according to user browser regional zone.
For example : in +03:00 zone now time is 06.05.2018 16:12:20.568
I want keep UTC zone time in milliseconds. (epoch time 00:00)
Can you Help?
Thank you