Answer the question
In order to leave comments, you need to log in
How to save the date without UTC, but just according to the current timezone?
I use the extension to mongo, I do it like this now
$collection = Yii::$app->mongodb->getCollection('visitors');
$collection->insert([
'created_at' => new UTCDateTime(round(microtime(true) * 1000)),
'user_ip' => Yii::$app->request->userIP,
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question