Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗯。。
我还有一个问题。我需要将 TimePicker (Windows Phone 7) 值转换为 unix 时间戳。
这怎么可能?
谢谢!
这应该有效:
DateTime selectedTime = ((DateTime) TimePicker.Value) public static double ConvertToUnix (DateTime selDate) { var unixStart = new DateTime (1970, 1, 1).ToLocalTime(); return (selDate - unixStart).TotalSeconds; }