UNIX Time stamp issues

Posted on 2006-05-09
Last Modified: 2010-08-05
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


Question by:bradbritton
    LVL 34

    Expert Comment

    by:Brian Crowe
    utcnow is zulu time or GMT time.  Try using
    LVL 34

    Accepted Solution


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now