×

Discussion Board

Results 1 to 8 of 8

Hybrid View

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    18

    UNIX EPOCH - SYMBIAN EPOCH = ?

    Anyone happen to have this value on hand? usec, msec, or even sec would be fine.

    Before you call me lazy, I tried dozens of online javascript calculators, and none seem to appreciate that 0 AD is a valid year. I tried 1AD and worked under the assumption that the value would be 31557600 seconds short, but that wasn't quite right either.

    Thanks!
    Craig

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: UNIX EPOCH - SYMBIAN EPOCH = ?

    As you are asking this is General Symbian, I wonder what this have to do with Javascript. In Symbian C++ you generally use TTime to get the current time.

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: UNIX EPOCH - SYMBIAN EPOCH = ?

    Just to add, you can create a TDateTime object for the Unix-0
    Code:
    TDateTime unixstamp(1970,0,0,0,0,0,0);
    convert it to TTime
    Code:
    TTime unixtime(unixstamp);
    then TTime has various operations, +/-, Seconds/MicroSecondsFrom, etc.
    By the way, the TTime you get is actually the difference itself (you can get the number with TTime::Int64).

  4. #4
    Registered User
    Join Date
    Sep 2010
    Posts
    18

    Re: UNIX EPOCH - SYMBIAN EPOCH = ?

    I'd be interested in hearing which board other than General Symbian C++ would be a more appropriate venue for this question.

    Also, while Symbian may use TTime, the rest of the world does not. Its neat that they store datetime internally as the number of microseconds since 1/1/0 00:00, really, but my task is to convert this 64 bit number into a meaningful date in Linux, and I do not have the option of modifying the Symbian code.

    I'll do the math myself and post here. I was just hoping someone could save me the trouble.

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: UNIX EPOCH - SYMBIAN EPOCH = ?

    Which programming language are you using and in with which Nokia programming technology ?

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: UNIX EPOCH - SYMBIAN EPOCH = ?

    Ok, so far both Jukka and me were thinking that you are developing Symbian C++ code. Now I understand that you are developing some other code which has to handle the output of a Symbian C++ code.
    Be back in a couple minutes.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: UNIX EPOCH - SYMBIAN EPOCH = ?

    The value seems to be 62168256000000000, which is somehow a bit too "round", but this is what appears in the debugger.
    For completeness, the TDateTime line needs EJanuary for month ("TDateTime unixstamp(1970,EJanuary,0,0,0,0,0);").

Similar Threads

  1. epoch time format
    By sonia1986 in forum Symbian
    Replies: 2
    Last Post: 2009-10-23, 13:38
  2. [moved] popen in unix & symbian
    By dinesh547 in forum Open C/C++
    Replies: 6
    Last Post: 2009-04-20, 12:37
  3. Unix format of time
    By mozillaman in forum Symbian
    Replies: 3
    Last Post: 2008-11-02, 00:56
  4. epoch.exe won't run
    By FontMan in forum Symbian
    Replies: 2
    Last Post: 2006-11-03, 11:30
  5. NMSS & Unix
    By cubfan in forum General Messaging
    Replies: 2
    Last Post: 2003-04-23, 07:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×