You can simply use the PHP
date() function to get the current data and time in various format, for example,
date('d/m/y H:i:s'), and so on.
Try out the following example to see how it basically works:
<?php // Return current date from the remote server $date = date('d-m-y h:i:s'); echo $date; ?>
The date and time returned by the above example is based on the server's default timezone setting. If you want to show date and time as per user's timezone, you can set the timezone manually using the
date_default_timezone_set() function before the
date() function call.
The following example shows the date and time in India timezone which is
<?php // Set the new timezone date_default_timezone_set('Asia/Kolkata'); $date = date('d-m-y h:i:s'); echo $date; ?>
How to Send POST Request Without Waiting for Response?In this article, I will share with you h...
How to check an element is visible or not using jQueryUse the jQuery :visible Select...
Login with Google Via Laravel 5.6Today, I am going to show you guys how t...
Laravel5.4 - Prevent Browser's Back Button Login After LogoutIn this tutorials we are sharing with yo...