|
|
@@ -269,6 +269,17 @@ export default function DayNightDetailPopup(props: {
|
|
|
// return `Tomorrow ${sunriseTime} - ${sunsetTime}`
|
|
|
}
|
|
|
|
|
|
+ function diffTimeZone(){
|
|
|
+ if (props.authInfo && props.authInfo.timezone){
|
|
|
+ var split = new Date().toString().split(' ');
|
|
|
+ var timeZoneFormatted = split[split.length - 2];
|
|
|
+ if (timeZoneFormatted!=props.authInfo.timezone){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
function events() {
|
|
|
let timelineItems: any = []
|
|
|
|
|
|
@@ -280,7 +291,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: 'done',
|
|
|
title: '日落',//list[0],
|
|
|
- content: TimeFormatter.dateTimeFormate(newT, true),
|
|
|
+ content: diffTimeZone()?TimeFormatter.dateTimeFormate2(newT):TimeFormatter.dateTimeFormate(newT, true),
|
|
|
date: '',
|
|
|
color: ColorType.night
|
|
|
}
|
|
|
@@ -290,7 +301,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: 'done',
|
|
|
title: '日出',//list[1],
|
|
|
- content: TimeFormatter.dateTimeFormate(newT2, true),
|
|
|
+ content: diffTimeZone()?TimeFormatter.dateTimeFormate2(newT2):TimeFormatter.dateTimeFormate(newT2, true),
|
|
|
date: '',
|
|
|
color: ColorType.night
|
|
|
}
|
|
|
@@ -303,7 +314,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: showExtraData() ? 'done' : 'padding',
|
|
|
title: '日落',//list[0],
|
|
|
- content: list[0] + ' ' + props.sunsetTime,
|
|
|
+ content: list[0] + ' ' + props.sunsetTime.substring(0,5),
|
|
|
date: '',
|
|
|
color: ColorType.night
|
|
|
}
|
|
|
@@ -313,7 +324,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: 'padding',
|
|
|
title: '日出',//list[1],
|
|
|
- content: list[1] + ' ' + props.sunriseTmrTime,
|
|
|
+ content: list[1] + ' ' + props.sunriseTmrTime.substring(0,5),
|
|
|
date: '',
|
|
|
color: ColorType.night
|
|
|
}
|
|
|
@@ -329,7 +340,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: 'done',
|
|
|
title: '日落',//list[0],
|
|
|
- content: TimeFormatter.dateTimeFormate(newT, true),
|
|
|
+ content: diffTimeZone()?TimeFormatter.dateTimeFormate2(newT):TimeFormatter.dateTimeFormate(newT, true),
|
|
|
date: '',
|
|
|
color: ColorType.day
|
|
|
}
|
|
|
@@ -339,7 +350,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: 'done',
|
|
|
title: '日出',//list[1],
|
|
|
- content: TimeFormatter.dateTimeFormate(newT2, true),
|
|
|
+ content: diffTimeZone()?TimeFormatter.dateTimeFormate2(newT):TimeFormatter.dateTimeFormate(newT2, true),
|
|
|
date: '',
|
|
|
color: ColorType.day
|
|
|
}
|
|
|
@@ -350,7 +361,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: showExtraData() ? 'done' : 'padding',
|
|
|
title: '日出',//dayDurationDesc(),
|
|
|
- content: dayDurationDesc() + ' ' + props.sunriseTime,
|
|
|
+ content: dayDurationDesc() + ' ' + props.sunriseTime.substring(0,5),
|
|
|
date: '',
|
|
|
color: ColorType.day
|
|
|
}
|
|
|
@@ -360,7 +371,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
status: 'padding',
|
|
|
title: '日落',//dayDurationDesc(),
|
|
|
- content: dayDurationDesc() + ' ' + props.sunsetTime,
|
|
|
+ content: dayDurationDesc() + ' ' + props.sunsetTime.substring(0,5),
|
|
|
date: '',
|
|
|
color: ColorType.day
|
|
|
}
|
|
|
@@ -428,11 +439,11 @@ export default function DayNightDetailPopup(props: {
|
|
|
{
|
|
|
(props.authInfo && props.authInfo.lat) ?
|
|
|
<View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
- <Text>{getLocation()}</Text>
|
|
|
- <View style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
|
- <Text>{t('feature.track_time_duration.third_ring.base_location_desc')}</Text>
|
|
|
+ <Text className='day_night_pop_location'>{getLocation()}</Text>
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between',alignItems:'center' }}>
|
|
|
+ <Text className='day_night_pop_desc'>{t('feature.track_time_duration.third_ring.base_location_desc')}</Text>
|
|
|
<View onClick={chooseLocation}>
|
|
|
- <Text>{t('feature.track_time_duration.third_ring.update_my_location')}</Text>
|
|
|
+ <Text className='day_night_pop_choose' style={{color:props.isNight?ColorType.night:ColorType.day}}>{t('feature.track_time_duration.third_ring.update_my_location')}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View> :
|
|
|
@@ -441,7 +452,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
e.stopPropagation()
|
|
|
}
|
|
|
props.updateLocation();
|
|
|
- }}>上报位置</View></View>
|
|
|
+ }}>{props.isNight ? t('feature.day_night.get_local_time') : t('feature.day_night.get_local_time_sunrise')}</View></View>
|
|
|
}
|
|
|
|
|
|
|