How to change time zone

while site setup set Time zone as Asia/Kolkata when i create user by default Asia/Kolkata time zone show but now i want when user create set time as Asia/Dubai
is this possible with any script or any other solution

You can easily set the timezone from the user doctype.

1 Like

@NCP its manually
can we create automatically using script
i have used this script but not working

frappe.ui.form.on(‘User’, {
onload: function(frm) {
if (!frm.doc.time_zone) {
frm.set_value(‘time_zone’, ‘Asia/Dubai’);
}
}
});

what error are getting

Actually the error is at Quote marks – > ‘ ’ is not identified by code. :slightly_smiling_face:

Use this code and check again.

frappe.ui.form.on('User', {
    onload: function(frm) {
        if (!frm.doc.time_zone) {
            frm.set_value('time_zone', 'Asia/Dubai');
        }
    }
});