All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
  Print view

Client PC Local Timezone in atk avaialble?
Author Message
PostPosted: Wed Nov 14, 2018 4:53 am 
Regular
User avatar
Offline

Joined: Thu Aug 25, 2011 9:31 pm
Posts: 303
Location: Mumbai, India
Client PC Local Timezone (NOT Server one set in php.ini) in atk avaialble?

My system is being used by a client having offices across globe. And System has some functionalities depends on Client PC Local Timezone

Currently i am fetching Client PC Local Timezone using following code
Code:
in preAddToEdit()
//This screen is called again with Client PC Local Timezone in aaa or bbb fetched thru $_GET['aaa']  , $_GET['bbb]   
// URL on reloading looks like below
//http://localhost/visualaid/index.php?atknodetype=requests.requester&atkaction=edit&atkselector=requester.id%3D%271%27&atklevel=-1&atkprevlevel=0&aaa=Wed%20Nov%2014%202018%2009:14:27%20GMT+0530%20(India%20Standard%20Time)&bbb=-330
//There is a session variable used to manage that it is called only ONCE and does NOT get into a loop

                // javescript date() is User/Client PC date in format=Thu Nov 08 2018 20:37:22 GMT 0545 (Nepal Time)
                $script = "setTimeout(function(){ window.location.href = window.location.href+'aaa='+Date()+'&bbb='+(new Date()).getTimezoneOffset(); }, 10);"; //10 millisseconds just for the sec
             $page = &$this->getPage();     //following java-scripts already registered in constructor
             $page->register_loadscript($script);


But is there anyway it is avaialble in atk as a $ATK variable or thru a function or something???

or any global $_SERVER variable or any easier trick?


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group