in reply to Time Zone conflict betwen clients in a web application

I have to enter user's time in my database and show it to them next time they login as last login time.

You could use JavaScript to populate a hidden field with their localtime when they login.

If you don't want to rely on JS or some other client-side application, you'll need to have the user select his timezone from a form like our Timezone Settings. Then, if you simply store the result of time on login, you can generate the user's last login time in the user's time zone using

my $dt = DateTime->from_epoch( epoch => $epoch_time_stored_in_db, time_zone => $time_zone_stored_in_db, ); print $dt->strftime("Last login at %Y-%m-%d %H:%M:%S\n");