using System; using System.Collections; using UnityEngine; public class Time : MonoBehaviour { // Use this for initialization private void Start() { Debug.Log(System.DateTime.Now); Debug.Log(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Debug.Log(System.DateTime.Now.Year + "-" + System.DateTime.Now.Month + "-" + System.DateTime.Now.Day + " " + System.DateTime.Now.Hour + ":" + System.DateTime.Now.Minute + ":" + System.DateTime.Now.Second); } // Update is called once per frame private void Update() { } }
时间: 2024-10-19 07:33:07