UNIX Time stamp issues

I am using the unix time stamp for a time stamp for a remote tool. The issue is that the code below converts to be exactly two hours ahead of my real system time. Any ideas???

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim n As Double

        n = (My.Computer.Clock.LocalTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds

        MessageBox.Show("The time is" + My.Computer.Clock.LocalTime.ToString + ", file time: " + n.ToString)

    End Sub


Who is Participating?
Brian CroweConnect With a Mentor Database AdministratorCommented:

Brian CroweDatabase AdministratorCommented:
utcnow is zulu time or GMT time.  Try using my.computer.clock.localtime.now
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.