12345678910111213141516171819202122 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class TimeManager : UpdateManager
- {
- public Text timetext;
- public string gxlj= "HH:mm:ss";
- public override void updateData()
- {
- base.updateData();
- DateTime now = DateTime.Now;
- string dateString = now.ToString("yyyy-MM-dd");
- string timeString = now.ToString(gxlj);
- string dateTimeString = dateString + " " + timeString;
-
- timetext.text = dateTimeString.ToString();
- }
- }
|