Update the server time with vuejs

0

I am creating a simple application in which I acquire the time with php:

<?php 
// Timezone
date_default_timezone_set("America/New_York"); // CDT
//Time
$timestamp = time();
//Format
$date_time = date("H:i:s", $timestamp);
//String
$time = "Hora: ".$date_time

?>

and until then everything is fine, but I would like to know how I can, by means of a vuejs device, update that clock every second, like a normal clock.

    
asked by Diesan Romero 10.11.2018 в 02:44
source

0 answers