| 1194 | * @since 3.8/4.5 |
| 1195 | */ |
| 1196 | public <C extends Calendrical<?, C>> GeneralTimestamp<C> toGeneralTimestamp( |
| 1197 | Chronology<C> chronology, |
| 1198 | TZID tzid, |
| 1199 | StartOfDay startOfDay |
| 1200 | ) { |
| 1201 | |
| 1202 | PlainTimestamp tsp = this.toZonalTimestamp(tzid); |
| 1203 | PlainTime time = tsp.getWallTime(); |
| 1204 | int deviation = startOfDay.getDeviation(tsp.getCalendarDate(), tzid); |
| 1205 | tsp = tsp.minus(deviation, ClockUnit.SECONDS); |
| 1206 | C date = tsp.getCalendarDate().transform(chronology.getChronoType()); |
| 1207 | return GeneralTimestamp.of(date, time); |
| 1208 | |
| 1209 | } |
| 1210 | |
| 1211 | /** |
| 1212 | * <p>Converts this instance to a general timestamp in given timezone. </p> |