Signup Now
Results 1 to 5 of 5
  1. #1
    Free User dedi's Avatar
    Join Date
    Dec 2013
    Posts
    275
    Reputation
    38
    Rep Power
    21

    Function to check current time.

    Would be nice to have function to check current time - I need it to my auto relogger, and I guess will be usefull for other aswell.
    I checked docs and didn't find it. If this function already exist, then sorry :P

  2. #2
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    tosec(time())

    converts the current time to seconds

  3. #3
    Administrator Lucas Terra's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    2,202
    Reputation
    141
    Rep Power
    10
    Check Raphael Library. He has some functions that returns the current time in UCT, CET, etc.

  4. #4
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    One of these should suit your needs:

    os.date('%X')               -- 10:43:27
    os.date('%H:%M') -- 10:43
    os.date('%d/%m/%Y - %H:%M') -- 15/12/2013 10:43


    If you need it as number of seconds, though:

    os.time() -- 1387111633

  5. #5
    Free User dedi's Avatar
    Join Date
    Dec 2013
    Posts
    275
    Reputation
    38
    Rep Power
    21
    Ah, I didn't check ur lib. Thx

 

 

Posting Permissions

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