20120315021529.000[-8:PST]
to get the first part I was able by using below C# code.
DateTime.UtcNow.ToString("yyyyMMddHHmmss.fff");
I want some help to get machine time stamp with zone in the format of above.
+ What this kind of time formatting is called?
From MSDN:
“zzz”
Hours and minutes offset from UTC.
More information: The “zzz” Custom Format Specifier.
6/15/2009 1:45:30 PM -07:00 -> -07:00
So you can use:
DateTime.UtcNow.ToString(“yyyyMMddHHmmss.fff[zzz]”);
However, this will give you the timezone relative to UTC not to PST.
You could always read the time zone info relative to UTC and add the difference yourself.