12345678910111213141516171819202122232425262728 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class GetSystemTimers : MonoBehaviour
- {
- // Start is called before the first frame update
- private Text timerText;
- void Start()
- {
- timerText = this.GetComponent<Text>();
- }
- // Update is called once per frame
- void Update()
- {
- GetSystemTimes();
- }
- private void GetSystemTimes()
- {
- DateTime NowTime = DateTime.Now.ToLocalTime();
- //timerText.text = NowTime.ToString("yyyy年-MM月-dd日 HH:mm:ss");
- timerText.text = NowTime.ToString("dd日 HH:mm:ss");
- }
- }
|