Issue
If you use below code it will give you output in 12 hours format:
var gdt = new GlideDateTime('2014-08-31 18:00:00');
var gt = gdt.getLocalTime();
gs.debug(gt.getByFormat('HH:mm:ss'));
OutPut : 06:00:00 // this is converted 18:00:00 to 06:00:00 which is 12 hours format
If you use below code it will give you output in 24 hours format:
var gdt = new GlideDateTime('2014-08-31 18:00:00');
var gt = gdt.getTime();
gs.debug(gt.getByFormat('HH:mm:ss'));
OutPut : 18:00:00 // which is 24 hours format.
Release
All