using System;
using UnityEngine;
using UnityEngine.UI;
public class MyTimer : MonoBehaviour {
// 显示时间区域的文本
public Text text_timeSpend;
void Update()
{
text_timeSpend.text = string.Format("{0:D2}/{1:D2}/{2:D2},{3:D2}:{4:D2}:{5:D2}",
DateTime.Now.Year,DateTime.Now.Month,DateTime.Now.Day,DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
}
}