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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 03 Jul 2011 |
| Total Posts: 80 |
|
|
| 18 Apr 2013 06:12 AM |
| UnixTime Get's it from your PC time.. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 29 Nov 2009 |
| Total Posts: 697 |
|
|
| 18 Apr 2013 06:23 AM |
| Maybe, but what would local tick() return |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 29 Nov 2009 |
| Total Posts: 697 |
|
|
| 18 Apr 2013 07:34 AM |
| Haven't got anywhere with the testing >:{( |
|
|
| Report Abuse |
|
|
josh50000
|
  |
| Joined: 29 Nov 2009 |
| Total Posts: 697 |
|
| |
|
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 |
|
|
| |
|