Results 1 to 11 of 11

Thread: GetSystemTime?

  1. #1
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default GetSystemTime?

    How would I transfer this to actual system time?

    Like, instead of it returning 74893028 or whatever, having it return like 9:07 AM.

  2. #2
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    function TheTime : string;
    By: RsN (fixed by Ron)
    Description: Returns current time as a string
    *******************************************************************************}


    function TheTime: string;
    var
      Hour, Mins, Sec, MSec: Word;
      PAM: string;
    begin
      DecodeTime(Now, Hour, Mins, Sec, MSec);
      PAM := 'AM';
      if (Hour > 12) then
      begin
        Hour := Hour - 12;
        PAM := 'PM';
      end else if (Hour = 12) then
        PAM := 'PM'
      else if (Hour = 0) then
        Hour := 12;
      Result := (Padz(IntToStr(Hour), 2) + ':' + Padz(IntToStr(Mins), 2) + ':' + Padz(IntToStr(Sec), 2) + ' ' + PAM);
    end;

    that one is in srl

  3. #3
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh. Thanks!

    I probably would've been better off just searching, but I figured someone like you'd get it to me faster.

    Thanks!

  4. #4
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Besides, GetSystemTime returns the UpTime, not the local time.
    Verrekte Koekwous

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What do you mean the "UpTime"?

  6. #6
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Your computers clock in military time.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  7. #7
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh. I never knew that was called UpTime =/

    But anyways. Thanks for the help.

    Close the thread please?

  8. #8
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    "military time" is alot bttr than AM, PM.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  9. #9
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    UpTime isn't 24-hour time (what the military and stuff tend to use). It is the time the computer has been up and running. I'm assuming it starts when the computer boots.

  10. #10
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    UpTime isn't 24-hour time (what the military and stuff tend to use). It is the time the computer has been up and running. I'm assuming it starts when the computer boots.
    Yes..
    Verrekte Koekwous

  11. #11
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Oops, I'm thinking about Now time.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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