updated local-time support: replaced encode-local-time with encode-timestamp