日期未显示正确的日期 [英] date not showing the correct date

查看:111
本文介绍了日期未显示正确的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我对J2ME有问题,问题是,

在netbeans中使用模拟器时,成功将日期字段保存到数据库中,但是当我在手机(诺基亚E-63)中安装日期字段时,保存到数据库中的日期不是我在日期字段中输入的1.日期字段

Hi guys, I have some problem with J2ME, the problem is,

When using simulator in netbeans, saving date field to database is successfull, but when I instal it in my phone(nokia E-63) the date that saved into database not the 1 that I inputed in the date field, here my code part for date field

private DateField currentDate= new DateField("Date :", DateField.DATE);
private Date now = new Date();
currentDate.setDate(now);
myform.append(currentDate);



顺便说一下,我在netbeans中使用的设备属性是:
设备prifile:MIDP-2.0
设备配置:CLDC-1.1



btw the device properties I''m using in netbeans is:
Device prifile :MIDP-2.0
Device Configuration : CLDC-1.1

推荐答案

尝试设置时区
Try setting the timezone
private DateField currentDate= new DateField("Date :", DateField.DATE, TimeZone.getTimeZone(name of your timezone));


彼得


这篇关于日期未显示正确的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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