vodvud / php_zklib

GNU General Public License v2.0
23 stars 19 forks source link

Machine Date and Time Error #16

Closed aice09 closed 4 years ago

aice09 commented 4 years ago

After getting user attendance data form the machine, the date and time of the biometrics machine change. How to fix the issue?

vodvud commented 4 years ago

Hi! Maybe you used method setTime?

https://github.com/vodvud/php_zklib/blob/4602482cbdf018665e03b82dc59134eaac440cb0/example.php#L21

https://github.com/vodvud/php_zklib/blob/4602482cbdf018665e03b82dc59134eaac440cb0/zklib/src/Time.php#L9-L22

Because only this one can update time at the machine.

aice09 commented 4 years ago

Thank you, my bad! Working very well! I also add the default timezone before setting the time. date_default_timezone_set('Asia/Manila'); //Default Timezone $zk->setTime(date('Y-m-d H:i:s'));