generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

tick()

Previous Thread :: Next Thread 
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 05:46 AM
I am trying to work with the localised version of tick(), which differs from the global version in that it returns the client's current time insted of UNIX time.
Problem is that i'm not sure what the local version of tick() returns, is it the seconds passed from "00:00" on the client's computer or something else?

p.s can't find this information on the wiki.
Report Abuse
DBDude221 is not online. DBDude221
Joined: 31 Jan 2010
Total Posts: 74
18 Apr 2013 05:47 AM
It still returns UNIX time, it just adjusts relative to their time zone if im not mistaken
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 05:54 AM
"using it in a LocalScript will fetch the user's current time while using it in a Script will fetch the server's current time"
That is the only information for this in the wiki. I don't think it ajusts according to the client's time zone.
Report Abuse
DBDude221 is not online. DBDude221
Joined: 31 Jan 2010
Total Posts: 74
18 Apr 2013 05:56 AM
Yes, the local time only does apply to LocalScripts.

Im not sure at all how they work, because im still new to programming, but Im guessing localscripts have a way of extracting information from your computer.
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 06:01 AM
Yes, localscripts only work client side and do not interact with global objects, events, etc. Normal scripts only work globally. Thats why I don't think the global and client versions of tick() both use UNIX time.
Report Abuse
DBDude221 is not online. DBDude221
Joined: 31 Jan 2010
Total Posts: 74
18 Apr 2013 06:05 AM
Consider the fact that UNIX time has its own time zone (i dont know what it is, might be central, or pacific or anything)

It would probably work something like this

LocalUnixTime = UNIXTime - (UNIX Time - Local Users Time)
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 06:07 AM
LocalScripts don't connect to the internet, so they could not get the UNIX time.
Report Abuse
Guides is not online. Guides
Joined: 03 Jul 2011
Total Posts: 80
18 Apr 2013 06:12 AM
UnixTime Get's it from your PC time..
Report Abuse
DBDude221 is not online. DBDude221
Joined: 31 Jan 2010
Total Posts: 74
18 Apr 2013 06:15 AM
^ That would make sense. So, every PC has UNIX Time?
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 06:23 AM
Maybe, but what would local tick() return
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 06:30 AM
Ok, I think I might just do a few tests in studio and compare the returned numbers.
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 07:34 AM
Haven't got anywhere with the testing >:{(
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 07:49 AM
bump
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
18 Apr 2013 07:52 AM
There must be someone who has used this before...
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
18 Apr 2013 08:08 AM
experiment with it
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image