JSFiddle - React, Tailwind, and code Playground

by Laurent COULON

HTML

<input type="hidden" id="epoch_stamp" value="1496957384000" readonly >
<input type="text" id="converted_set_next_event" readonly >

JavaScript

<script>	
		function epoch_to_24h_date(){	
			
		var epochdate = new Date(~gpio_actual_schedule_event~ * 1); 						// multiply by 1000 for milliseconds
		var date_string = epochdate.toLocaleString('en-GB');  // 24 hour format			
		}	
		</script>


		<script>
		    window.onload= function(){
			    
			  epoch_to_24h_date();  
			  document.getElementById('converted_set_next_event').value = date_string;  
			       	 	                 
		    }   
		</script>