using System;
using System.Globalization;
using TMPro;
using UnityEngine;

namespace Cryville.EEW.Unity.UI {
	[RequireComponent(typeof(TMP_Text))]
	class TimeView : MonoBehaviour {
		TMP_Text _textView;

		void Awake() {
			_textView = GetComponent<TMP_Text>();
		}

		void Update() {
			_textView.text = string.Format(CultureInfo.CurrentCulture, "{0:G} ({1})", DateTime.Now, TimeZoneInfo.Local.ToTimeZoneString());
		}
	}
}
