Achievo Community
https://www.atk-framework.com/forum/

Client PC Local Timezone in atk avaialble?
https://www.atk-framework.com/forum/viewtopic.php?f=2&t=36683
Page 1 of 1

Author:  dgangal [ Wed Nov 14, 2018 4:53 am ]
Post subject:  Client PC Local Timezone in atk avaialble?

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?

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/