My system timezone is UTC+1, MySQL is using this timezone and it's ok. Now I want to get the same timestamps in WordPress. As you know, WordPress modifies the current timezone so time() returns UTC-related time. There is a possibility to use current_time('timestamp') to get either UTC timestamp or Wordpress-timezone timestamp. But my WordPress timezone is different from the system one.
So the question is: how can I get SYSTEM timestamp inside the WordPress environment? I guess they should leave a core function for that since I can not use time() anymore.
Of course, there is a stupid solution like (time() + 3600), but I don't like it.
date()
would display the time in that timezone. So I'm not sure what you're trying to do exactly.time()
. What do you intend to do with this timestamp?