Web 应用测试的假时区 [英] Fake time zone for web app testing

查看:23
本文介绍了Web 应用测试的假时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网络应用程序,而亚洲的一些人发现程序中的日期存在一些奇怪的时区问题.有没有办法伪造 chrome、firefox 或 IE 来假装我电脑的时区和他们的一样,这样我就可以轻松调试问题?

I have a web app and some people in Asia are seeing some weird time zone issues with the dates in the program. Is there a way to fake chrome or firefox or IE to pretend like my computer's timezone is like theirs so I can debug the issues easily?

推荐答案

当然:使用自定义的 TZ 环境变量而不是通常的运行方式从命令行启动浏览器:

Sure: launch the browser from the command line with a customized TZ environment variable instead of the way you normally run it:

TZ=Japan firefox &

确保当您像这样启动 firefox 时它尚未运行,因为如果它已经在运行,那么它可能只会在浏览器的现有实例下打开一个新窗口,而不是启动一个新实例.

Make sure firefox isn't already running when you launch it like this because if it is already running then it will probably just open a new window under the existing instance of the browser instead of starting a new instance.

这篇关于Web 应用测试的假时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆