×

Discussion Board

Results 1 to 5 of 5

Thread: timestamp

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    144

    timestamp

    Dear Guys,

    long time no see (yes, still developing on S60 FP2)
    I need to get the current unix-style timestamp (since 1900).
    It starts with a 134... its a long int.

    how on earth do I do it?
    I converted TTime to 64int but its a different story (since 0 AD)

    thanks!
    Stavros

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: timestamp

    Hi

    unix timestamp is number of seconds since 1970. Check TTime method IMPORT_C TInt SecondsFrom(TTime aTime, TTimeIntervalSeconds &aInterval) const; that is exactly what you need

    Regards,
    Igor

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

    Re: timestamp


  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    144

    Re: timestamp

    thanks, it worked
    although I had to do

    for (int i=0; i<100; i++)
    TimeStamp -= 621682560;

    since 621682560*100 was to large for symbian to crunch...

    ciao

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: timestamp

    While it is comfortable to blame Symbian, consider learning that C/C++-type languages denote 64-bit integers with a double l/L suffix.
    Like 62168256000LL.

Similar Threads

  1. OVI SMS DB3 Timestamp
    By sdyulolo in forum General Messaging
    Replies: 0
    Last Post: 2010-05-29, 02:25
  2. Timestamp
    By royalsnn in forum Symbian
    Replies: 3
    Last Post: 2010-03-12, 03:12
  3. NTP timestamp
    By khalandar in forum Mobile Java General
    Replies: 5
    Last Post: 2007-03-30, 06:44
  4. PIM API and Timestamp
    By divyas in forum Mobile Java General
    Replies: 1
    Last Post: 2006-09-06, 23:33
  5. SMS timestamp
    By ivanyiu in forum General Messaging
    Replies: 0
    Last Post: 2006-02-07, 06: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
  •  
×