问题描述
我想根据我在 import firebase from 'firebase/app';
//or both
import firebase from 'firebase/app';
import 'firebase/functions';
中设置的值正确显示时间。它应该显示 useState
。为什么它是显示9:00 AM
。
请在此处检查我的代码和框
Invalid Time Format
解决方法
编辑这部分代码:
role1 = discord.utils.get(ctx.guild.roles,name='Verified')
await ctx.author.remove_roles(role1)
为此:
value={format(new Date(selectedTime),"hh:mm:00 a")}
或者这个:
value={format(new Date(selectedTime),"yyyy-MM-dd''HH:mm:ss")}
它应该可以正常工作,请查看此文档链接: https://date-fns.org/v2.16.1/docs/format