如何把一个double型的时间转换为:年月日,时分秒,毫秒的形式
谢谢!!!

解决方案 »

  1.   

    double是怎么得来的?1.0对应什么时间?
      

  2.   

    The localtime function converts a time stored as a time_t value and stores the result in a structure of type tm. The long value timer represents the seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). This value is usually obtained from the time function.
    如果你的double时间单位是秒,可以用localtime这个函数,注意减去你的基准时间和1970/1/1/00/00/00的时间差。