Achievo Community

Client PC Local Timezone in atk avaialble?
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
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
//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

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