Popular posts from this blog
a2b3 output aabbb c program and beautiful use of getchar() ,isdigit() ,atoi() functions and stdlib.h header file-asr
a2b3 output aabbb c program Beautiful use of getchar() ,isdigit() ,atoi() functions and stdlib.h header file i noted in string comparison single quote used,while in initialization double quotes /****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <stdio.h> #include <stdlib.h> int main() { char s[10],n[10],c[10]; int i=0,j,num=0; int p[10]; while(1){ s[i]=getchar(); //reads single characters until enter pressed if(isdigit(s[i])) //checks the character is digit or not ...
Get Local time| Get International Time in Javascript | Get Local time in php | Get Time according to timezone in php | Get Time According to local timezone
Local Time/ International Time. Headache! The solution:- Use unix timestamp for converting time to local of international timezone for different places. Just save your time as unix timestamp. From Your Browser: with javascript const unixtime= new Date().getTime(); Save this timestamp for database. While printing on frontend just pass it into the Date class: const localTime= new Date(unixtime); From php script: $unixTime=time().'000';

Comments
Post a Comment